Expand Minimize

IoWMIHandleToInstanceName routine

The IoWMIHandleToInstanceName routine determines the instance name for the WMI class instance implemented by the driver that is specified by a file handle.

Syntax


NTSTATUS IoWMIHandleToInstanceName(
  _In_   PVOID DataBlockObject,
  _In_   HANDLE FileHandle,
  _Out_  PUNICODE_STRING InstanceName
);

Parameters

DataBlockObject [in]

Pointer to a WMI data block object. The caller opens the data block object for the WMI class with the IoWMIOpenBlock routine.

FileHandle [in]

Specifies a file handle. The routine returns the instance name corresponding to the driver that is represented by the file handle.

InstanceName [out]

Pointer to the UNICODE_STRING structure that the routine uses to return the instance name. The caller frees the returned buffer within UNICODE_STRING.

Return value

The routine returns an NTSTATUS code. Possible return values include:

Return codeDescription
STATUS_SUCCESS

The operation succeeded. The routine fills the UNICODE_STRING structure pointed to by the InstanceName parameter with the instance name.

STATUS_WMI_INSTANCE_NOT_FOUND

The driver does not implement any instances of the WMI class specified by DataBlockObject.

 

Requirements

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

IRQL

<= APC_LEVEL

See also

DEVICE_OBJECT
IoWMIOpenBlock
IoWMIDeviceObjectToInstanceName

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft