Partager via


UfnGetSystemSerialNumber (Compact 2013)

3/26/2014

This function retrieves a serial number from the OAL and then verifies that the serial number adheres to Windows-based desktop platform Plug and Play restrictions.

Syntax

DWORD UfnGetSystemSerialNumber(
  LPWSTR pszSerialNumber,
  DWORD cchSerialNumber
);

Parameters

  • pszSerialNumber
    [out] Pointer to the buffer to store the serial number after verification.
  • cchSerialNumber
    [in] Serial number. The length of this parameter should be at least MAX_STRING_DESC_WCHARS + 1.

Return Value

If successful, the serial number is stored in pszSerialNumber, and the return value is ERROR_SUCCESS. If the function does not retrieve a valid serial number, the return value is set in the ValidateSerialNumber function, or by the GetLastError function.

Remarks

The USB function client driver helper library is in %_WINCEROOT%\Public\Common\OAK\Drivers\Usbfn\Ufnclientlib.

This function calls IOCTL_HAL_GET_UUID through KernelIoControl. Then it calls ValidateSerialNumber to verify that the identifier adheres to the Windows-based desktop platform Plug and Play restrictions.

Requirements

Header

usbfntypes.h

Library

UfnClientLibBase.lib

See Also

Reference

USB Function Client Driver Helper Library Functions
UfnGetRegistryInfo

Other Resources

IOCTL_HAL_GET_UUID
KernelIoControl