90613f5039
update to ITHVNR 3.5640.1 and translation
22 lines
446 B
C++
22 lines
446 B
C++
// apiwin_p.cc
|
|
// 10/6/2012 jichi
|
|
#include "texthook/winapi_p.h"
|
|
#include <windows.h>
|
|
|
|
WINAPI_BEGIN_NAMESPACE
|
|
|
|
bool IsProcessActiveWithId(DWORD dwProcessId)
|
|
{
|
|
bool ret = false;
|
|
if (HANDLE hProc = ::OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, dwProcessId)) {
|
|
DWORD dwExitCode;
|
|
ret = ::GetExitCodeProcess(hProc, &dwExitCode) && (dwExitCode == STILL_ACTIVE);
|
|
::CloseHandle(hProc);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
WINAPI_END_NAMESPACE
|
|
|
|
// EOF
|