Operation Manual
ProgrammingChapter —7
214 700 Series Color Mobile Computer User’s Manual
IOCTL_HAL_ITC_WRITE_SYSP ARM
Describes and enables the registry save location.
Usage
#include “oemioctl.h”
Syntax
BOOL KernelIoControl( IOCTL_HAL_ITC_WRITE_SYSPARM,LPVOID lpInBuf,DWORD
nInBufSize, LPVOID lpOutBuf, DWORD nOutBufSize, LPDWORD lpBytesReturned );
Parameters
lpInBuf Asinglebytethatmaybeoneoftheid values. S ee “ID Field Values”
on the next page.
nInBufSize Must be set to the size of the lpInBuf in bytes.
lpOutBuf Must point to a buffer large enough to hold the data to be written
to the non-volatile data store.
nOutBufSize ThesizeoflpOutBuf in bytes.
lpBytesReturned The nu mber of bytes re turned by the function.
Return Values
Returns TRUE if function succeeds. Returns FALSE if the function fails.
GetLastError() may be used to get the error v alue. Either
ERROR_INVALID_PARAMETER or
ERROR_INSUFFICIENT_BUFFER may be retur ned when this fu nction
is used to get the error.
ID Field Values
The id field of lpInBuf may be one of the following values:
ID Field 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 i n OEMIOCTL.H; th e value specifies the position the s witch 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)
}