Returns an HRESULT that indicates whether launching a new process or attaching to the specified existing process is possible within the context of the current machine and runtime configuration.
[in] The ID of an existing process.
[in] Pass in true if you plan to launch with Win32 debugging enabled, or to attach with Win32 debugging enabled; otherwise, pass false.
S_OK if the debugging services determine that launching a new process or attaching to the given process is possible, given the information about the current machine and runtime configuration. Possible HRESULT values are:
This method is purely informational. The interface will not stop you from launching or attaching to a process, regardless of the value returned by CanLaunchOrAttach.
If you plan to launch with Win32 debugging enabled or attach with Win32 debugging enabled, pass true for win32DebuggingEnabled. The HRESULT returned by CanLaunchOrAttach might differ if you use this option.