HWN_CLIENT_SET_STATE callback function (hwnclx.h)

Implemented by the client driver to set hardware notification component state. It is invoked when a user wants to change the state of a driver.

Syntax

HWN_CLIENT_SET_STATE HwnClientSetState;

NTSTATUS HwnClientSetState(
  [in]  PVOID Context,
  [in]  PVOID Buffer,
  [in]  ULONG BufferLength,
  [out] PULONG BytesWritten
)
{...}

Parameters

[in] Context

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.

[in] Buffer

Buffer of BufferLength bytes containing a HWN_HEADER structure including one or more HWN_SETTINGS structures that specify the hardware notifications to be set.

[in] BufferLength

The size of Buffer in bytes.

[out] BytesWritten

Pointer to a variable that indicates the number of bytes written by the function.

Return value

Return STATUS_SUCCESS if the operation succeeds. Otherwise, return an appropriate NTSTATUS error code.

Remarks

Register your implementation of this callback function by setting the appropriate member of HWN_CLIENT_REGISTRATION_PACKET and then calling HwNRegisterClient.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1709
Minimum supported server Windows Server 2016
Target Platform Windows
Header hwnclx.h
IRQL PASSIVE_LEVEL

See also

Hardware notifications support

Hardware notifications reference