The IoWMIAllocateInstanceIds routine allocates one or more instance IDs that are unique to the GUID.
NTSTATUS IoWMIAllocateInstanceIds( LPCGUID Guid, ULONG InstanceCount, ULONG *FirstInstanceId );
Pointer to the GUID for which to generate instance identifiers.
Specifies how many instance identifiers should be provided.
Pointer to the first instance identifier that the driver should use.
IoWMIAllocateInstanceIds returns a status code from the following list:
||Indicates that WMI successfully provided unique instance identifiers for the GUID specified.|
||Indicates that the WMI services are not available.|
||Indicates that insufficient resources were available to provide the caller with instance IDs.|
If greater than one instance was requested in InstanceCount and the routine completed successfully, FirstInstanceId points to the first instance that the caller should use. For each instance requested beyond one, the caller should increment the value returned in *FirstInstanceId. For example, if the caller requested six instances and one was returned as the value of FirstInstanceId, the caller should use the values 1-6 as his unique instance identifiers.
|Minimum supported client||Available starting with Windows 2000.|
|Header||wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)|
|DDI compliance rules||IrqlIoPassive5, PowerIrpDDis, HwStorPortProhibitedDDIs, SpNoWait, StorPortStartIo|