1 # Copyright (c) Twisted Matrix Laboratories.
2 # See LICENSE for details.
5 This is a mock win32process module.
7 The purpose of this module is mock process creation for the PID test.
9 CreateProcess(...) will spawn a process, and always return a PID of 42.
13 GetExitCodeProcess = win32process.GetExitCodeProcess
14 STARTUPINFO = win32process.STARTUPINFO
16 STARTF_USESTDHANDLES = win32process.STARTF_USESTDHANDLES
19 def CreateProcess(appName,
29 This function mocks the generated pid aspect of the win32.CreateProcess
31 - the true win32process.CreateProcess is called
32 - return values are harvested in a tuple.
33 - all return values from createProcess are passed back to the calling
34 function except for the pid, the returned pid is hardcoded to 42
37 hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(
48 return (hProcess, hThread, dwPid, dwTid)