IVsDebugger2.GetOutputHandleForProcess 方法

获取处理的输出处理。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop.8.0(在 Microsoft.VisualStudio.Shell.Interop.8.0.dll 中)

语法

声明
Function GetOutputHandleForProcess ( _
    dwPid As UInteger, _
    <OutAttribute> ByRef pOutputHandle As ULong _
) As Integer
int GetOutputHandleForProcess(
    uint dwPid,
    out ulong pOutputHandle
)

参数

  • pOutputHandle
    类型:System.UInt64%
    [out] 输出设备的句柄。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

获取使用的句柄,当重定向 stdout 为 WinForms 应用程序时。这将是控制台窗口或输出窗口中,根据用户设置。

COM 签名

从 vsshell80.idl:

HRESULT GetOutputHandleForProcess(
    [in] DWORD dwPid,
    [out] ULONG64 *pOutputHandle
);

.NET Framework 安全性

请参见

参考

IVsDebugger2 接口

Microsoft.VisualStudio.Shell.Interop 命名空间