Previous | Next |
The GetSerialNumber method retrieves a serial number that uniquely identifies the device.
Syntax
HRESULT GetSerialNumber(
PWMDMID pSerialNumber,
BYTE abMac[WMDM_MAC_LENGTH]
);
Parameters
pSerialNumber
[out] Pointer to a WMDMID structure containing the serial number information.
abMac
[in, out] Array of eight bytes containing the message authentication code for the parameter data of this method. (WMDM_MAC_LENGTH is defined as 8.)
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Return code | Description |
E_INVALIDARG | The pSerialNumber parameter is an invalid or NULL pointer. |
WMDM_E_NOTSUPPORTED | The device does not support serial numbers. |
E_FAIL | An unspecified error occurred. |
Remarks
It is important to note that not all devices support serial numbers. To determine whether the device supports serial numbers, the caller must always check the return code when calling this function. If a media device supports serial numbers, the serial number of the media device is guaranteed to be unique for that device.
See Also
Previous | Next |