// hwnclx.h
HWN_CLIENT_GET_STATE HwnClientGetState;
NTSTATUS HwnClientGetState(
[in] PVOID Context,
[out] PVOID OutputBuffer,
[in] ULONG OutputBufferLength,
[in] PVOID InputBuffer,
[in] ULONG InputBufferLength,
[out] PULONG BytesRead
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
Implemented by the client driver to get hardware notification component state. It is invoked when a user requests status information.
Context [in]Pointer to the client driver's context information. This memory space is available for use by the client driver. It is allocated as part of the framework object context space by WdfDeviceCreate. For more information, see HWN_CLIENT_REGISTRATION_PACKET and Framework Object Context Space.
OutputBuffer [out]Buffer of OutputBufferLength bytes for writing hardware notification status. If the function succeeds, the buffer will contain a HWN_HEADER structure including one or more HWN_SETTINGS structures.
Note
OutputBufferLength must be large enough to contain all of the requested settings. For more information, see Remarks.
OutputBufferLength [in]The size of OutputBuffer in bytes.
InputBuffer [in]Buffer of InputBufferLength bytes containing a HWN_HEADER holding one or more HWN_SETTINGS structures where the IDs for the requested hardware notification components are stored in the HwNId field. This buffer can be NULL.
InputBufferLength [in]The size of InputBuffer in bytes.
BytesRead [out]Pointer to a variable that indicates the number of bytes read by the function.
Return STATUS_SUCCESS if the operation succeeds. Otherwise, return an appropriate NTSTATUS error code.
HWN_CLIENT_GET_STATE HwnClientGetState;
NTSTATUS HwnClientGetState(
_In_ PVOID Context,
_Out_ PVOID OutputBuffer,
_In_ ULONG OutputBufferLength,
_In_ PVOID InputBuffer,
_In_ ULONG InputBufferLength,
_Out_ PULONG BytesRead
)
{ ... }
typedef HWN_CLIENT_GET_STATE *PHWN_CLIENT_GET_STATE;
Register your implementation of this callback function by setting the appropriate member of HWN_CLIENT_REGISTRATION_PACKET and then calling HwNRegisterClient.
If InputBuffer is NULL, the output buffer will be used to store a HWN_HEADER structure that contains all of the settings for the hardware notifications implemented by the driver.
The Settings for a hardware notification component are stored in a HWN_SETTINGS structure. The HwNSettingsInfo field of the HWN_HEADER structure contains an array of HWN_SETTINGS structures.
Hardware notifications support
Hardware notifications reference