CONFIGMG_Get_Device_ID

CONFIGRET CONFIGMG_Get_Device_ID(DEVNODE dnDevNode, PFARVOID Buffer, ULONG BufferLen, ULONG ulFlags)
 

Retrieves the device identifier for a device node.

dnDevNode
Handle of a device node we want the device ID of.
Buffer
Address of buffer that receives the device identifier. If this buffer is larger than the device identifier, the function appends a null-terminating character to the data. If it is smaller than the device identifier, the function fills it with as much of the device identifier as will fit and returns CR_BUFFER_SMALL.
BufferLen
The size, in bytes, of the buffer for the device identifier.
ulFlags
Must be zero.

To ensure that the buffer pointed to by the Buffer parameter is large enough to hold the entire device identifier, device drivers can call the CONFIGMG_Get_Device_ID_Size function.

Example

Code that retrieves a device identifier might look like the following example:

CM_Get_Device_ID_Size(&size, dnDevNode, 0);
if (p=malloc(size+1))
        CM_Get_Device_ID(dnDevNode, p, size+1, 0);
 

See Also

CONFIGMG_Get_Device_ID_Size