|
Gaudi Framework, version v21r8 |
| Home | Generated: 17 Mar 2010 |
Public Member Functions | |
| ProcessHandle (long pid) | |
| virtual | ~ProcessHandle () |
| long | item () |
| void * | handle () |
Private Attributes | |
| void * | m_handle |
| bool | m_needRelease |
Definition at line 111 of file ProcessDescriptor.h.
| System::ProcessDescriptor::ProcessHandle::ProcessHandle | ( | long | pid | ) |
Definition at line 229 of file ProcessDescriptor.cpp.
00229 { 00230 if ( pid > 0 ) { 00231 if ( pid != s_myPid ) { 00232 #ifdef _WIN32 00233 m_handle = ::OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ,FALSE, 00234 pid); 00235 #else 00236 m_handle = (void*)s_myPid; 00237 #endif 00238 m_needRelease = true; 00239 return; 00240 } 00241 } 00242 m_handle = processHandle(); 00243 m_needRelease = false; 00244 }
| System::ProcessDescriptor::ProcessHandle::~ProcessHandle | ( | ) | [virtual] |
Definition at line 246 of file ProcessDescriptor.cpp.
00246 { 00247 if ( m_needRelease ) { 00248 #ifdef _WIN32 00249 ::CloseHandle(m_handle); 00250 #else 00251 m_handle = 0; 00252 #endif 00253 } 00254 }
| long System::ProcessDescriptor::ProcessHandle::item | ( | ) | [inline] |
Definition at line 117 of file ProcessDescriptor.h.
00117 { 00118 return m_needRelease ? 1 : 0; 00119 }
| void* System::ProcessDescriptor::ProcessHandle::handle | ( | ) | [inline] |
void* System::ProcessDescriptor::ProcessHandle::m_handle [private] |
Definition at line 112 of file ProcessDescriptor.h.
Definition at line 113 of file ProcessDescriptor.h.