Topic

Why would GetWaitEvent not return a handle?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5243
    Onester
    Participant

    Hi, me again, I’m splitting my questions into different topics to keep the board cleaner and easier for people to search!

    In Local Network Monitor Api C# samples, GetWaitEvent is declared to return a bool, and in the monitor sample it is used as follows:

    if (NtTdiApi.GetWaitEvent(hDriver))
    {
    NtTdiApi.WaitForData( hDriver, 0xFFFFFFFF/*INFINITE*/ );
    }
    else
    {
    System.Threading.Thread.Sleep( 1000 );
    }

    Under what circumstances would GetWaitEvent not return a handle, and cause this ‘else’ block to execute?

    Many thanks!

    #6722
    Anton
    Participant

    Hi,

    It looks like an error in GetWaitEvent declaration for C#.
    Should return int.

    We’ll fix it into the next update.

    Thank you for feedback.
    =Anton.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.