Intermec 700 User Manual

Page 261

Advertising
background image

Programming

Chapter 7

237

700 Series Color Mobile Computer User’s Manual

PROCESSENTRY32 peProcess;
DWORD thDeviceProcessID;
TCHAR lpname[MAX_PATH];

if ( !pname || !*pname ) return FALSE;

_tcscpy( lpname, pname );
_tcslwr( lpname );

hProcList = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );

if ( hProcList == INVALID_HANDLE_VALUE ) {

return FALSE;

} // end if

memset( &peProcess, 0, sizeof(peProcess) );
peProcess.dwSize = sizeof(peProcess);

if ( !Process32First( hProcList, &peProcess ) ) {

CloseToolhelp32Snapshot( hProcList );
return FALSE;

} // end if

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,

Advertising