I am using a thread and the thread waits for three different events, but depending on which event gets signaled the thread needs to run different parts of the code, like a switch statement. But i haven’t been able to find an example of how to check the which event got signaled, the only return values that I found are STATUS_SUCCESS, STATUS_ALERTED and STATUS_TIMEOUT.
Can somebody help me with this?
thank you,
Catalina
Status = STATUS_WAIT_0 for object at array position 0, STATUS_WAIT_1 for
object at array position 1, etc. Docs for KeWaitForSingleObject show
this.
– arlie
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of catalina olarte
Sent: Tuesday, May 09, 2006 2:10 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to check which event is signaled with
KeWaitForMultipleObjects()?
I am using a thread and the thread waits for three different events, but
depending on which event gets signaled the thread needs to run different
parts of the code, like a switch statement. But i haven’t been able to
find an example of how to check the which event got signaled, the only
return values that I found are STATUS_SUCCESS, STATUS_ALERTED and
STATUS_TIMEOUT.
Can somebody help me with this?
thank you,
Catalina
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Use KeWaitForMultipleObjects() and use WaitAny for the WaitType. Then
check the return status for STATUS_WAIT_xxxx.
Note that the other return values still need to be handled
appropriately.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of catalina olarte
Sent: Tuesday, May 09, 2006 2:10 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to check which event is signaled with
KeWaitForMultipleObjects()?
I am using a thread and the thread waits for three different events, but
depending on which event gets signaled the thread needs to run different
parts of the code, like a switch statement. But i haven’t been able to
find an example of how to check the which event got signaled, the only
return values that I found are STATUS_SUCCESS, STATUS_ALERTED and
STATUS_TIMEOUT.
Can somebody help me with this?
thank you,
Catalina
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
STATUS_SUCCESS
STATUS_WAIT1 = STATUS_SUCCESS + 1
STATUS_WAIT2 = STATUS_SUCCESS + 2
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “catalina olarte”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, May 09, 2006 10:10 PM
Subject: [ntdev] How to check which event is signaled with
KeWaitForMultipleObjects()?
> I am using a thread and the thread waits for three different events, but
depending on which event gets signaled the thread needs to run different parts
of the code, like a switch statement. But i haven’t been able to find an
example of how to check the which event got signaled, the only return values
that I found are STATUS_SUCCESS, STATUS_ALERTED and STATUS_TIMEOUT.
> Can somebody help me with this?
>
> thank you,
>
> Catalina
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer