ProgrammingChapter 7
257700Series Color Mobile Computer User’sManual
IOCTL_HAL_GET_DEVICEID
This IOCTL returns the device ID. There are twotypes of device IDs
supported,whicharedifferentiatedbasedonthesizeoftheoutputbuffer.
TheUUIDisreturnedifthebuffersizeissetto
sizeof(UNIQUE_DEVICEID),otherwisetheoldstyledeviceIDisre-
turned.
Usage
#include “pkfuncs.h”
#include “deviceid.h”
Syntax
BOOL KernelIoControl( IOCTL_HAL_GET_DEVICEID,LPVOID
lpInBuf,DWORD nInBufSize,LPVOID lpOutBuf,DWORD
nOutBufSize,LPDWORD lpBytesReturned );
Parameters
lpInBuf Shouldbe set to NULL. STRICT_ID settings are not supported.
lpInBufSize Should be set to ze ro.
lpOutBuf Must point to a UNIQUE_DEVICEID struc ture as defined by
DEVICEID.H if the UUID is to be returned
nOutBufSize The size of the UNIQUE_DEVICEID in byte s if the UUID is to
be returned.A DEVICE_ID as defined by PKFUNCS.His re-
turned if the size in bytes is greater than or equal to sizeof(DE-
VICE_ID).
lpBytesReturned Thenumber of bytes returned by the function.
ReturnValues
Returns TRUE if function succeeds. Returns FALSE if the function fails.
GetLastError() may be used to get the extende d error value.