Windows Media Format SDK banner art
PreviousNext

IMDSPDevice::GetSerialNumber

The GetSerialNumber method retrieves the 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 that receives the serial number information for the device. This parameter is included in the output message authentication code.

  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_NOTCERTIFIED The caller is not authorized, and calls to other Service Provider interfaces will also fail and return this code.
WMDM_E_NOTSUPPORTED This device does not support serial numbers.
E_FAIL An unspecified error occurred.

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.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.