ProgrammingChapter —7
250 700Series Color MobileComputer User’s Manual
Kernel I/O ControlsThis describes the KernelIoControl()functions available to application
programmers. Most C++ applications will need to prototype the function
as the followingto avoid link and compile errors.
extern “C” BOOL KernelIoControl(DWORD dwIoControlCode, LPVOID lpInBuf, DWORD
nInBufSize, LPVOID lpOutBuf, DWORD nOutBufSize, LPDWORD lpBytesReturned);
IOCTL_HAL_GET_DEVICE_INFO
This IOCTL returns either the platformtype or the OEMPLATFORM
namebasedonaninputvalue.
Syntax
BOOL KernelIoControl( IOCTL_HAL_GET_DEVICE_INFO, LPVOID
lpInBuf, DWORD nInBufSize, LPVOID lpOutBuf, DWORD
nOutBufSize, LPDWORD lpBytesReturned );
Parameters
lpInBuf Points to a DWORD containing either the SPI_GETPLAT-
FORMTYPEor SPI_GETOEMINFO value.
lpInBufSize Must be set to sizeof(DWORD).
lpOutBuf Must point to a buffer large enough to holdthe return dataof the
function. If SPI_GETPLATFORMTYPE is specified in lpInBuf,
then the “PocketPC\0” Unicodestring is retu rned. IfSPI_GE -
TOEMINFOis specified in lpInBu f,then the “Intermec 700\0”
Unicodestring is returned.
nOutBufSize ThesizeoflpOutBuf in bytes. Mustbe large enough to hold the
string returned.
lpBytesReturned Theactual number of bytes returnedby the function for the data
requested.
ReturnValues
Returns TRUE if function succeeds. Returns FALSE if the function fails.
GetLastError() may be used to get the extende d error value.