Share via


IWMDMStorageGlobals::GetSerialNumber

banner art

The GetSerialNumber method retrieves a serial number that uniquely identifies the storage medium.

Syntax

HRESULT GetSerialNumber(
  PWMDMID  pSerialNum,
  BYTE  abMac[WMDM_MAC_LENGTH]
);

Parameters

pSerialNum

[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

The method returns an HRESULT. All the interface methods in Windows Media Device Manager and service provider 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

For a complete list of possible error codes, see Error Codes.

Possible values include, but are not limited to, those in the following table.

Return code Description
E_INVALIDARG The pSerialNum parameter is an invalid or NULL pointer.
WMDM_E_NOTSUPPORTED The device does not support serial numbers.
E_FAIL An unspecified error occurred.
WMDM_E_NOTCERTIFIED The caller is not certified.
WMDM_E_MAC_CHECK_FAILED The message authentication check failed.

Remarks

Not all storage media support serial numbers. The return code must always be checked to determine whether the storage medium provides this support.

If the storage medium cannot report a unique serial number, content protected by Microsoft digital rights management cannot be transferred to this storage medium.

Requirements

Header: Defined in wmdm.idl.

Library: mssachlp.lib

See Also