Chapter 3 — Configuring the Computer

Return Values

Returns TRUE if the function is successful, returns FALSE if not. GetLastError() may be used to get the error value. When this function is used to get the error, either ERROR_INVALID_PARAMETER or ERROR_INSUFFICIENT_BUFFER is returned.

ID Field Values

The id field of lpInBuf may be one of the following values:

ITC_REGISTRY_SAVE_ENABLE

Enables or disables the save registry to non–volatile media feature of the RegFlushKey() function. lpOutBuf must be set to zero (FALSE) if the feature is to be disabled or one (TRUE) if the feature is to be enabled.

ITC_ DOCK_SWITCH

This IOCTL sets a position of the dock switch. The dock switch may be set to either “modem” or “serial” positions. lpOutBuf must point to a buffer that contains a byte value of either DOCK_MODEM or DOCK_SERIAL as defined in oemioctl.h; the value specifies the position the switch is to be set. The call appears as follows:

//port = DOCK_MODEM or DOCK_SERIAL as defined in oemioctl.h BOOL SetDockSwitch( BYTE port)

{

DWORD cmd = ITC_DOCK_SWITCH; DWORD cbRet;

return KernelIoControl(IOCTL_HAL_ITC_WRITE_SYSPARM,&cmd, sizeof(cmd), &port,sizeof(port),&cbRet)

}

ITC_ WAKEUP_MASK

This IOCTL sets a bit mask that represents the mask for the five programmable wakeup keys. The I/O key is not a programmable wakeup key. By default it is always the system resume key and all other keys are set to disable key wakeup. A zero in a bit position masks the wakeup for that key. A one in a bit position enables wakeup for that key. lpOutBuf must point to a buffer that contains a byte value of a wakeup mask consisting of the OR’ed constants as defined in oemioctl.h. Only the following keys are programmable as wakeup events.

#define SCANNER_TRIGGER 1 #define SCANNER_LEFT 2 #define SCANNER_RIGHT 4 #define GOLD_A1 8 #define GOLD_A2 0x10

ITC_AMBIENT_KEYBOARD

This IOCTL sets the threshold for the keypad ambient sensor. This can be a value from 0 (always off) to 255 (always on). lpOutBuf must point to a buffer that contains a byte value of the desired setting.

ITC_AMBIENT_FRONTLIGHT

This IOCTL sets the threshold for the frontlight ambient sensor. This can be a value from 0 (always off) to 255. lpOutBuf must point to a buffer that contains a byte value of the desired setting.

IOCTL_HAL_GET_DEVICEID

This returns the device ID. There are two types of device IDs supported, which are differentiated based on the size of the output buffer. The UUID is returned if the buffer size is set to sizeof(UNIQUE_DEVICEID), otherwise the oldstyle device ID is returned.

Usage

#include “pkfuncs.h” #include “deviceid.h”

751G Color Mobile Computer User’s Manual

71

Page 85
Image 85
Intermec 751G user manual Id field of lpInBuf may be one of the following values, #include pkfuncs.h #include deviceid.h