IMDSPDevice::GetSerialNumber method (mswmdm.h)
The GetSerialNumber method retrieves the serial number that uniquely identifies the device.
Syntax
HRESULT GetSerialNumber(
[out] PWMDMID pSerialNumber,
[in, out] BYTE [8] abMac
);
Parameters
[out] pSerialNumber
Pointer to a WMDMID structure that receives the serial number for the device. This parameter is included in the output message authentication code.
[in, out] abMac
Array of eight bytes containing the message authentication code for the parameter data of this method. (WMDM_MAC_LENGTH is defined as 8.)
Return value
The method returns an HRESULT. All the interface methods in Windows Media Device Manager can return any of the following classes of error codes:
- Standard COM error codes
- Windows error codes converted to HRESULT values
- Windows Media Device Manager error codes
Remarks
Not all media devices support serial numbers. To determine whether the device supports serial numbers, always check the return code when calling this method. If a media device does support serial numbers, the serial number of the media device is guaranteed to be unique.
This method is optional. When transferring protected content, Windows Media Device Manager uses IMDSPStorageGlobals::GetSerialNumber. For more information, see Mandatory and Optional Interfaces.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | mswmdm.h |
Library | Mssachlp.lib |