Operation Manual
Programming—Chapter 7
199700 Series Color Mobile Computer User’s Manual
thDeviceProcessID = 0;
do {
_tcslwr( peProcess.szExeFile );
if ( _tcsstr( peProcess.szExeFile, lpname)){
thDeviceProcessID = peProcess.th32ProcessID;
break;
} // end if
} while ( Process32Next( hProcList, &peProcess ) );
if ( ( GetLastError() == ERROR_NO_MORE_FILES ) && ( thDeviceProcessID == 0
)){
CloseToolhelp32Snapshot( hProcList );
return FALSE;
} // end if
CloseToolhelp32Snapshot( hProcList );
return TRUE;
} // IsProcessRunning
codeINSTALL_INIT Install_Init(
HWND hwndParent,
BOOL fFirstCall,
BOOL fPreviouslyInstalled,
LPCTSTR pszInstallDir )
{
return codeINSTALL_INIT_CONTINUE;
}
codeINSTALL_EXIT Install_Exit (
HWND hwndParent,
LPCTSTR pszInstallDir,
WORD cFailedDirs,
WORD cFailedFiles,
WORD cFailedRegKeys,
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