STATUS_TIMEOUT help?

Hi,

In an IRP processing, i’m using KeWaitForSingleObject for an object for specific time, the object is not signaed and the status comes as STATUS_TIMEOUT, and i’m completing the IRP with the timeout status. But in the application my deviceiocontrol call returns TRUE, but i want it to fail.

Any suggestions?

That is because status_timeout is not an error

//
// MessageId: STATUS_TIMEOUT
//
// MessageText:
//
// STATUS_TIMEOUT
//
#define STATUS_TIMEOUT ((NTSTATUS)0x00000102L) // winnt

In this situation, just look in ntstatus.h for a status with timeout in its name that is !NT_SUCCESS. In this case

//
// MessageId: STATUS_IO_TIMEOUT
//
// MessageText:
//
// {Device Timeout}
// The specified I/O operation on %hs was not completed before the time-out period expired.
//
#define STATUS_IO_TIMEOUT ((NTSTATUS)0xC00000B5L)

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Tuesday, August 10, 2010 10:09 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] STATUS_TIMEOUT help?

Hi,

In an IRP processing, i’m using KeWaitForSingleObject for an object for specific time, the object is not signaed and the status comes as STATUS_TIMEOUT, and i’m completing the IRP with the timeout status. But in the application my deviceiocontrol call returns TRUE, but i want it to fail.

Any suggestions?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer