CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2004
    Posts
    61

    Question WaitForMultipleObjects (counter less than number of phandler)

    Dear All,

    I have a question here.
    I'm using WaitForMultipleObjects function.
    I have 4 lpHandles.
    my software are running fine now.

    If let said i change the nCount to 2 but i still pass in 4 lphandles objects,
    Will the WaitForMultipleObjects return after the 2 event signaled or it will wait until all the 4 event signaled?
    Thanks.

    DWORD WINAPI WaitForMultipleObjects(
    __in DWORD nCount,
    __in const HANDLE *lpHandles,
    __in BOOL bWaitAll,
    __in DWORD dwMilliseconds
    );

  2. #2
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: WaitForMultipleObjects (counter less than number of phandler)

    Reading the MSDN help page is easier than opening a topic.

  3. #3
    Join Date
    Dec 2004
    Posts
    61

    Re: WaitForMultipleObjects (counter less than number of phandler)

    Dear Skizmo,

    Thanks. I have go though the MSDN help page.
    It seem like if i want to change the nCount, i have to reset my plHandles array as well.
    This is because my lphandles need to be dynamic.
    Thanks.

  4. #4
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    2,042

    Re: WaitForMultipleObjects (counter less than number of phandler)

    Quote Originally Posted by VbEndUser View Post
    It seem like if i want to change the nCount, i have to reset my plHandles array as well.
    This is because my lphandles need to be dynamic.
    Where did you read this?
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured