The IoWMIDeviceObjectToProviderId routine translates the specified device object into the corresponding WMI Provider ID.
ULONG
IoWMIDeviceObjectToProviderId(
IN PDEVICE_OBJECT DeviceObject
);
IoWMIDeviceObjectToProviderId returns the WMI Provider ID associated with the specified device object.
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
IoWMIDeviceObjectToProviderId should be used when filling in the ProviderId member of the WNODE_HEADER structure in those cases when the WNODEHEADER structure is being initialized as part of a WNODE_EVENT_ITEM or WNODE_EVENT_REFERENCE structure. (If the WNODE_HEADER is being used for other purposes, ProviderId is reserved.)
When running on a 32-bit operating system, the provider Id and the device object are identical. When running on a 64-bit operating system, IoWMIDeviceObjectToProviderId will convert the 64-bit device object to a 32-bit provider ID.