// storport.h
ULONG StorPortWaitForSingleObject(
PVOID HwDeviceExtension,
PVOID Object,
BOOLEAN Alertable,
PLARGE_INTEGER Timeout
);
View the official Windows Driver Kit DDI referenceNo description available.
A miniport can call StorPortWaitForSingleObject function to put the current thread into a wait state until the given dispatcher object is set to signaled state or optionally times out.
HwDeviceExtensionPointer to the storage miniport's device extension.
ObjectPointer to the initialized dispatcher object (event, mutex, semaphore, thread, or timer).
AlertableBoolean value set TRUE if the wait is alertable and FALSE otherwise.
TimeoutPointer to the timeout value that specifies the absolute or relative time, in 100-nanosecond units, at which the wait is to be completed.
A positive value specifies an absolute time, relative to January 1, 1601. A negative value specifies an interval relative to the current time. Absolute expiration times track any changes in the system time; relative expiration times are not affected by system time changes.
If Timeout = 0, the routine returns without waiting. If the miniport supplies a NULL pointer, the routine waits indefinitely until the dispatcher object is set to the signaled state. For more information, see the following Remarks section.
StorPortSetEvent returns a status code such as one of the following:
| Return code | Description |
|---|---|
| STOR_STATUS_INVALID_PARAMETER | One or more of the parameters are invalid. |
| STOR_STATUS_SUCCESS | The ETW event was successfully logged. |
| STOR_STATUS_UNSUCCESSFUL | The operation failed. |
See KeWaitForSingleObject for more details.
Callers of StorportWaitForSingleObject must be running at IRQL <= DISPATCH_LEVEL. However, if Timeout = NULL or Timeout != 0, the caller must be running at IRQL <= APC_LEVEL and in a nonarbitrary thread context. (If Timeout != NULL and Timeout = 0, the caller must be running at IRQL <= DISPATCH_LEVEL.)