Intermec 700 Laptop User Manual


 
ProgrammingChapter 7
238 700 Series Color Mobile Computer User’sManual
WORD cFailedRegVals,
WORD cFailedShortcuts )
{
HANDLE h;
TCHAR srcfile[MAX_PATH];
TCHAR dstfile[MAX_PATH];
if (cFailedDirs || cFailedFiles || cFailedRegKeys ||
cFailedRegVals || cFailedShortcuts)
return codeINSTALL_EXIT_UNINSTALL;
if ( IsProcessRunning( L”autocab.exe” ) )
{
h = CreateFile( L”\\Windows\\__resetmeplease__.txt”,
(GENERIC_READ | GENERIC_WRITE), 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_HIDDEN, NULL );
if ( h != INVALID_HANDLE_VALUE )
CloseHandle( h );
else
{
// Couldn’t create the file. If it failed because the file already
exists, it is not fatal.
// Otherwise, notify user of the inability to reset the device and they
will have to
// perform it manually after all of the installations are complete.
} // end if
}
else
{
DWORD dret;
h = CreateFile( L”SYI1:”,
(GENERIC_WRITE | GENERIC_READ), 0, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL );
// Force a warm start NOW.
if ( h != INVALID_HANDLE_VALUE )
{
DeviceIoControl( h, IOCTL_TERMINAL_RESET, NULL, 0, NULL, 0, &dret,
NULL);
// Won’t return, but we’ll show clean up anyway
CloseHandle( h );
}
else
{
// Couldn’t access SYSIO. Notify user.
} // end if
} // end if
return codeINSTALL_EXIT_DONE;
}
codeUNINSTALL_INIT
Uninstall_Init(
HWND hwndParent,
LPCTSTR pszInstallDir ) {