ProgrammingChapter —7
262 700Series Color MobileComputer User’s Manual
IOCTL_HAL_GET_BOOT_DEVICE

This IOCTL code allows software to check which devic e CE booted from.

Usage
#include “oemioctl.h”
Syntax
BOOL KernelIoControl( IOCTL_HAL_GET_BOOT_DEVICE,LPVOID
lpInBuf,DWORD nInBufSize,LPVOID lpOutBuf,DWORD
nOutBufSize,LPDWORD lpBytesReturned );
Parameters
lpInBuf Should be set to NULL.
lpInBufSize Should be set to ze ro.
lpOutBuf Must point to a buffer large enough to holda DWORD (4 bytes)
that contains the boot device. T he following boot devices are sup-
ported:
#define HAL_BOOT_DEVICE_UNKNOWN 0
#define HAL_BOOT_DEVICE_ROM_XIP 1
#define HAL_BOOT_DEVICE_ROM 2
#define HAL_BOOT_DEVICE_PCMCIA_ATA 3
#define HAL_BOOT_DEVICE_PCMCIA_LINEAR 4
#define HAL_BOOT_DEVICE_IDE_ATA 5
#define HAL_BOOT_DEVICE_IDE_ATAPI 6
nOutBufSize ThesizeoflpOutBufin bytes (4).
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.