Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Sharath C V

@Sharath C V
About
Posts
52
Topics
20
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Broken image links in the articles that come up for approval
    S Sharath C V

    Oops, sorry for posting in wrong form, I did not find another place where I could post this. Will delete this now that I got the answer...

    The Weird and The Wonderful question

  • Broken image links in the articles that come up for approval
    S Sharath C V

    I am seeing broken links in many of the articles/tips/blogs that come up for approval. Is this expected? ::confused::

    The Weird and The Wonderful question

  • As always, the reviews are hilarious
    S Sharath C V

    Yeah, I saw :omg: that!!

    The Lounge com json

  • As always, the reviews are hilarious
    S Sharath C V

    Maybe there should be a review on review...!! :) :doh:

    The Lounge com json

  • Difference between NDIS 6.3 and 6.4 with respect to Mobile Broadband APIs
    S Sharath C V

    Thanks very much for your reply Matt. And great to know that you worked on WWAN APIs! No, the APIs are nice. It is pretty nice as to how they have pulled it off. Finding it really helpful. Since Microsoft did that homework, our live is better and we can spend quality time on other work items. -Sharath

    Hardware & Devices visual-studio com hardware question

  • Difference between NDIS 6.3 and 6.4 with respect to Mobile Broadband APIs
    S Sharath C V

    Yes, its the same.

    Hardware & Devices visual-studio com hardware question

  • Difference between NDIS 6.3 and 6.4 with respect to Mobile Broadband APIs
    S Sharath C V

    Does anyone know if there are any major difference in Mobile Broadband APIs between NDIS 6.3 and NDIS 6.4 based drivers? As per MS documentation, there is not much of a difference: http://msdn.microsoft.com/en-us/library/windows/hardware/dn449742(v=vs.85).aspx[^]

    Hardware & Devices visual-studio com hardware question

  • Russia wants Apple, SAP to cooperate against foreign spying
    S Sharath C V

    Eddy Vluggen wrote:

    So, trust demands open source?

    Good one!! Lol :)

    The Insider News com tools question

  • Image links broken on the article I submitted today
    S Sharath C V

    Thanks very much for the update Sean.

    Article Writing question

  • Image links broken on the article I submitted today
    S Sharath C V

    redoing the image link solved the issue. don't know why, but the link changed after submission. wrote a mail to submit@codeproject.com and they approved it faster...

    Article Writing question

  • Image links broken on the article I submitted today
    S Sharath C V

    redone the image link, let us see if this fixes the issue... article is again in pending list.. :(

    Article Writing question

  • Image links broken on the article I submitted today
    S Sharath C V

    Image links are broken on the article I submitted today. :( It was fine when it was in pending state. Article id is 791286. Does anyone have any idea on this? -Sharath

    Article Writing question

  • "Something bad happened" error on article submission
    S Sharath C V

    Debugged it, I missed to supply tags in the Tags text box! :) Successfully submitted the article now...

    Article Writing help graphics sysadmin

  • "Something bad happened" error on article submission
    S Sharath C V

    I am trying to submit my article today and I am getting following error. Tried three times and is getting the same error. Article id is 791286. Error details given below: First attempt: Something bad happened We're not sure what, but we have a few guesses. Problem: Object reference not set to an instance of an object. Ticket: 7720095 Server: Web04 Second attempt: Something bad happened We're not sure what, but we have a few guesses. Problem: Object reference not set to an instance of an object. Ticket: 7720097 Server: Web01 Third attempt: Something bad happened We're not sure what, but we have a few guesses. Problem: Object reference not set to an instance of an object. Ticket: 7720098 Server: Web02 Note: I like the graphics on this error page though :)

    Article Writing help graphics sysadmin

  • Executing few lines of code on Windows Store app installation
    S Sharath C V

    Thanks Pete for your valuable input on this...

    C# question

  • Executing few lines of code on Windows Store app installation
    S Sharath C V

    Is it possible to execute few lines of code on installing a windows Store App? The lines of code that needs to be executed will be part of the store app itself. So far, I am unable to find any information on this, but if any one has any info on this, please let me know. As of now I am trying to evaluate the feasibility.

    C# question

  • "One or more exceptions" occurred at Task.Start()
    S Sharath C V

    Thanks to both of you for your valuable help. Changed it as shown below and got it working without loosing sequence and with corresponding thread id...

    private void TaskRunButton_Click(object sender, EventArgs e)
    {
    // clear the list before writing
    listBox.Items.Clear();
    Task demoTask = new Task(DemoTask);
    demoTask.Start();
    }

    private void DemoTask()
    {
    try
    {
    List<Task> tsk1 = new List<Task>();
    List<Task> tsk2 = new List<Task>();

    	for (int i = 0; i < 10; i++)
    	{
    		tsk1.Add(new Task(TaskDemoWait100ms));
    		tsk2.Add(new Task(TaskDemoWaitWait200ms));
    	}
    
    	for (int i = 0; i < 10; i++)
    	{
    		tsk1\[i\].Start();
    		tsk2\[i\].Start();
    		tsk2\[i\].Wait();
    		listBox.BeginInvoke(new separatorDelegate(() =>
    		{ listBox.Items.Add("------------"); }));
    	}
    }
    catch (Exception ex)
    {
    	string msg = ex.Message;
    }
    

    }

    delegate void taskdelegate(int threadId);
    delegate void separatorDelegate();

    private void TaskDemoWait100ms()
    {
    Thread.Sleep(100);
    object[] param = new object[1];

    param\[0\] = (object)Thread.CurrentThread.ManagedThreadId;
    
    listBox.BeginInvoke(new taskdelegate((int threadId) =>
    { listBox.Items.Add("Wait 100 ms, Thread Id = " + threadId); }), param);
    

    }

    private void TaskDemoWaitWait200ms()
    {
    Thread.Sleep(200);
    object[] param = new object[1];

    param\[0\] = (object)Thread.CurrentThread.ManagedThreadId;
    
    listBox.BeginInvoke(new taskdelegate((int threadId) =>
    { listBox.Items.Add("Wait 200 ms, Thread Id = " + threadId); }), param);
    

    }

    C# debugging csharp visual-studio help question

  • "One or more exceptions" occurred at Task.Start()
    S Sharath C V

    Thanks very much for your thoughts. Yes, Invoke also blocks as you mentioned. BeginInvoke solves the issue, but sequence goes wrong. Regarding async / await, I am aware of it. In the project from where I took the code and posted here, it has async / await sample also. I am working on a sample for async / await. In that same sample I wanted to add Task.Start() as an example to demonstrate the use of Task.Wait() via another button on the UI. That's the reason I am doing wait immediately after Task.Start() :)

    C# debugging csharp visual-studio help question

  • "One or more exceptions" occurred at Task.Start()
    S Sharath C V

    I don't see any failing thread, because I am getting the values in the list box correctly, but as you mentioned, it may fail at any time. Thanks very much for your valuable inputs. I will work on this and update further...

    C# debugging csharp visual-studio help question

  • "One or more exceptions" occurred at Task.Start()
    S Sharath C V

    I have a form application with a button and a listbox. When I click the button, I launch about 10 tasks and then do a wait on each of the tasks. When I try to run this from Visual Studio 2013 in Debug mode, I get an exception "One or more errors occurred" at Task.Start() itself, but when I run this outside of the debugger, then it works fine. Is this a Visual Studio issue? Any light on this would be helpful. Please find the code snippet below:

    private void SynchronousWait200ms()
    {
    Thread.Sleep(200);
    listBox.Items.Add("Wait 200 ms, Thread Id = " + Thread.CurrentThread.ManagedThreadId);
    }

    private void TaskRunButton_Click1(object sender, EventArgs e)
    {
    listBox.Items.Clear();
    try
    {
    List<Task> tsk1 = new List<Task>();

        for (int i = 0; i < 10; i++)
        {
            tsk1.Add(new Task(SynchronousWait200ms));
            tsk1\[i\].Start();
            tsk1\[i\].Wait();
        }
    
        listBox.Items.Add("------------");
    }
    catch (Exception ex)
    {
        string msg = ex.Message;
    }
    

    }

    C# debugging csharp visual-studio help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups