EnableAutoConnect
The EnableAutoConnect function turns Autoconnect on and off.
BOOL EnableAutoConnect
{
BOOL
bEnable
}
Parameters
bEnable
[in] Flag that indicates whether ActiveSync is being automatically executed (TRUE) or ActiveSync is
being not automatically executed (FALSE) when user plug cable into terminal.
Return Values
Return TRUE if the operation is successful; otherwise FALSE.
Remarks
After called EnableAutoConnect with bEnable set to TRUE, terminal will automatically execute ActiveSync
program when user plug cable into terminal. After called EnableAutoConnect with bEnable set to FALSE,
terminal will not automatically execute ActiveSync program when user plug cable into terminal.
Example
BOOL bResult;
bResult = EnableAutoConnect(TRUE);
if(bResult == FALSE)
AfxMessageBox(_T("EnableAutoConnect
fail"));
Requirements
OS Versions:
Windows CE 4.2 and later.
Header:
sysapiax.h
Link Library:
sysapiax.lib
Link DLL:
sysapiax.dll
Device:
PT80
RegisterAlphaKeyNotification
Register the application to SYSAPIAX.dll, so that SYSAPIAX.dll will send a windows message to the application when the
Programming Manual
23