- 時間撮記:
- 2016-6-22 下午09:21:53 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/ValidationKit/testdriver/winbase.py
r56295 r61833 35 35 36 36 # Windows specific imports. 37 import win32api; # pylint: disable= F040138 import win32con; # pylint: disable= F040139 import win32console; # pylint: disable= F040140 import win32event; # pylint: disable= F040141 import win32process; # pylint: disable= F040137 import win32api; # pylint: disable=import-error 38 import win32con; # pylint: disable=import-error 39 import win32console; # pylint: disable=import-error 40 import win32event; # pylint: disable=import-error 41 import win32process; # pylint: disable=import-error 42 42 43 43 # Validation Kit imports. … … 57 57 """ 58 58 try: 59 # pylint: disable=no-member 59 60 win32console.GenerateConsoleCtrlEvent(win32con.CTRL_BREAK_EVENT, uPid); 60 61 #GenerateConsoleCtrlEvent = ctypes.windll.kernel32.GenerateConsoleCtrlEvent … … 71 72 fRc = False; 72 73 try: 73 win32api.PostThreadMessage(uTid, win32con.WM_CLOSE, 0, 0); 74 win32api.PostThreadMessage(uTid, win32con.WM_CLOSE, 0, 0); # pylint: disable=no-member 74 75 fRc = True; 75 76 except: … … 81 82 fRc = False; 82 83 try: 83 win32api.PostThreadMessage(uTid, win32con.WM_QUIT, 0x40010004, 0); # DBG_TERMINATE_PROCESS 84 win32api.PostThreadMessage(uTid, win32con.WM_QUIT, 0x40010004, 0); # DBG_TERMINATE_PROCESS # pylint: disable=no-member 84 85 fRc = True; 85 86 except: … … 89 90 def processTerminate(uPid): 90 91 """ The Windows version of base.processTerminate """ 92 # pylint: disable=no-member 91 93 fRc = False; 92 94 try: … … 109 111 def processExists(uPid): 110 112 """ The Windows version of base.processExists """ 113 # pylint: disable=no-member 111 114 fRc = False; 112 115 try: … … 164 167 165 168 # Try start the process. 169 # pylint: disable=no-member 166 170 dwCreationFlags = win32con.CREATE_NEW_PROCESS_GROUP; 167 171 oStartupInfo = win32process.STARTUPINFO(); … … 188 192 # Try get full access to the process. 189 193 try: 190 hProcessFullAccess = win32api.DuplicateHandle( \191 win32api.GetCurrentProcess(), \192 hProcess, \193 win32api.GetCurrentProcess(), \194 win32con.PROCESS_TERMINATE \195 | win32con.PROCESS_QUERY_INFORMATION \196 | win32con.SYNCHRONIZE \197 | win32con.DELETE, \198 False, \194 hProcessFullAccess = win32api.DuplicateHandle( 195 win32api.GetCurrentProcess(), 196 hProcess, 197 win32api.GetCurrentProcess(), 198 win32con.PROCESS_TERMINATE 199 | win32con.PROCESS_QUERY_INFORMATION 200 | win32con.SYNCHRONIZE 201 | win32con.DELETE, 202 False, 199 203 0); 200 204 win32api.CloseHandle(hProcess); … … 210 214 """ 211 215 try: 212 dwWait = win32event.WaitForSingleObject(hProcess, 0); 216 dwWait = win32event.WaitForSingleObject(hProcess, 0); # pylint: disable=no-member 213 217 except: 214 218 reporter.logXcpt('hProcess=%s %#x' % (hProcess, hProcess,)); … … 222 226 """ 223 227 try: 224 win32api.TerminateProcess(hProcess, 0x40010004); # DBG_TERMINATE_PROCESS 228 win32api.TerminateProcess(hProcess, 0x40010004); # DBG_TERMINATE_PROCESS # pylint: disable=no-member 225 229 except: 226 230 reporter.logXcpt('hProcess=%s %#x' % (hProcess, hProcess,));
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器