Debugging Tools for Windows |
The CreateProcess and CreateProcessWide methods create a process from the specified command line.
HRESULT
IDebugClient::CreateProcess(
IN ULONG64 Server,
IN PSTR CommandLine,
IN ULONG CreateFlags
);
HRESULT
IDebugClient3::CreateProcessWide(
IN ULONG64 Server,
IN PWSTR CommandLine,
IN ULONG CreateFlags
);
#ifdef UNICODE
#define CreateProcessT CreateProcessWide
#else
#define CreateProcessT CreateProcess
#endif
This method may also return error values. See Return Values for more details.
CreateProcess is available in all versions of IDebugClient. CreateProcessWide is available in IDebugClient3 and later versions.
This method is available only for live user-mode debugging.
If CreateFlags contains either of the flags DEBUG_PROCESS or DEBUG_ONLY_THIS_PROCESS, the engine will also attach to the newly created process; this is similar to the behavior of CreateProcessAndAttach2 with its argument ProcessId set to zero.
For more information about creating and attaching to live user-mode targets, see Live User-Mode Targets.
Headers: Defined in dbgeng.h. Include dbgeng.h.
CreateProcess2, AttachProcess, CreateProcessAndAttach2, .create (Create Process), ConnectProcessServer