Closes the handle to the process. @note: Normally you don't need to call this method. All handles created by I{WinAppDbg} are automatically closed when the garbage collector claims them. So unless you've been tinkering with it, setting L{hProcess
(self)
| 213 | self.hProcess = hProcess |
| 214 | |
| 215 | def close_handle(self): |
| 216 | """ |
| 217 | Closes the handle to the process. |
| 218 | |
| 219 | @note: Normally you don't need to call this method. All handles |
| 220 | created by I{WinAppDbg} are automatically closed when the garbage |
| 221 | collector claims them. So unless you've been tinkering with it, |
| 222 | setting L{hProcess} to C{None} should be enough. |
| 223 | """ |
| 224 | try: |
| 225 | if hasattr(self.hProcess, "close"): |
| 226 | self.hProcess.close() |
| 227 | elif self.hProcess not in (None, win32.INVALID_HANDLE_VALUE): |
| 228 | win32.CloseHandle(self.hProcess) |
| 229 | finally: |
| 230 | self.hProcess = None |
| 231 | |
| 232 | def get_handle(self, dwDesiredAccess=win32.PROCESS_ALL_ACCESS): |
| 233 | """ |
no test coverage detected