Previous Next

IoWMISuggestInstanceName

The IoWmiSuggestInstanceName routine is used to request that WMI suggest a base name which a driver can use to build WMI instance names for the device.

NTSTATUS
  IoWMISuggestInstanceName(
    IN PDEVICE_OBJECT  PhysicalDeviceObject OPTIONAL,
    IN PUNICODE_STRING  SymbolicLinkName OPTIONAL,
    IN BOOLEAN  CombineNames,
    OUT PUNICODE_STRING  SuggestedInstanceName
    );

Parameters

PhysicalDeviceObject
If supplied, points to the driver's physical device object.    
SymbolicLinkName
If supplied, points to the symbolic link name returned from IoRegisterDeviceInterface.
CombineNames
If TRUE then the suggested names returned will combine the PhysicalDeviceObject and SymbolicLinkName information.
SuggestedInstanceName
A pointer to a buffer which upon successful completion will contain a UNICODE STRING which contains the suggested instance name. The caller is responsible for freeing this buffer when it is no longer needed.

Return Value

IoWMISuggestInstanceName returns a status code from the following list:

STATUS_SUCCESS
Indicates that WMI was able to successfully complete this function.
STATUS_UNSUCCESSFUL
Indicates that the WMI services are not available.
STATUS_INSUFFICIENT_RESOURCES
Indicates that insufficient resources were available to provide the caller with a buffer containing the UNICODE string.
STATUS_NO_MEMORY
Indicates that insufficient resources were available to provide the caller with a buffer containing the UNICODE string.

Headers

Declared in wdm.h or ntddk.h. Include wdm.h or ntddk.h.

Comments

If CombineNames is TRUE then both PhysicalDeviceObject and SymbolicLinkName must be specified. Otherwise only one of them should be specified.

See Also

IoWMIAllocateInstanceIds