IVsDebugger2.GetOutputHandleForProcess(UInt32, UInt64) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取进程的输出句柄。
public:
int GetOutputHandleForProcess(System::UInt32 dwPid, [Runtime::InteropServices::Out] System::UInt64 % pOutputHandle);
int GetOutputHandleForProcess(unsigned int dwPid, [Runtime::InteropServices::Out] unsigned long & pOutputHandle);
public int GetOutputHandleForProcess (uint dwPid, out ulong pOutputHandle);
abstract member GetOutputHandleForProcess : uint32 * uint64 -> int
Public Function GetOutputHandleForProcess (dwPid As UInteger, ByRef pOutputHandle As ULong) As Integer
参数
- dwPid
- UInt32
中应用程序的进程 ID。
- pOutputHandle
- UInt64
弄输出设备的句柄。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
获取在重定向 Windows 窗体应用程序时要使用的句柄 stdout 。 这将是控制台窗口或 "输出" 窗口,具体取决于用户设置。
COM 签名
从 vsshell80:
HRESULT GetOutputHandleForProcess(
[in] DWORD dwPid,
[out] ULONG64 *pOutputHandle
);