IoWMISetNotificationCallback routine

The IoWMISetNotificationCallback routine registers a notification callback for a WMI event.

Syntax


NTSTATUS IoWMISetNotificationCallback(
  _Inout_  PVOID                     Object,
  _In_     WMI_NOTIFICATION_CALLBACK Callback,
  _In_opt_ PVOID                     Context
);

Parameters

Object [in, out]

Pointer to a WMI data block object. The caller opens the data block object for the WMI event with the IoWMIOpenBlock routine. The object must be opened with the WMIGUID_NOTIFICATION access right.

Callback [in]

Pointer to a function of the form:


 XxxWmiNotificationCallback(PVOID Wnode, PVOID Context);

WMI calls this function to notify the caller that the specified event has occurred. The Wnode parameter of the callback routine points to the WNODE_EVENT_ITEM structure returned by the driver triggering the event. The Context parameter of the callback routine points to the value specified in the Context parameter of the IoWMISetNotificationCallback routine.

Context [in, optional]

Specifies the value that WMI passes to the callback routine when the event occurs.

Return value

This routine returns STATUS_SUCCESS on success, and the appropriate NTSTATUS error code on failure.

Requirements

Target platform

Universal

Version

Available in Windows XP and later versions of the Windows operating system.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

<= APC_LEVEL

See also

IoWMIOpenBlock
WNODE_EVENT_ITEM

 

 

Send comments about this topic to Microsoft

Show: