Previous | Next |
The GetSerialNumber method retrieves a serial number uniquely identifying 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. 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 pSerialNum parameter is an invalid or NULL pointer. |
WMDM_E_NOTSUPPORTED | The device does not support serial numbers. |
E_FAIL | An unspecified error occurred. |
Remarks
Not all storage media support serial numbers. The return code must always be checked to determine if the storage medium provides this support.
See Also
Previous | Next |