共用方式為


IVsDebugger2.GetOutputHandleForProcess Method

Gets an output handle for a process.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

Syntax

'宣告
Function GetOutputHandleForProcess ( _
    dwPid As UInteger, _
    <OutAttribute> ByRef pOutputHandle As ULong _
) As Integer
'用途
Dim instance As IVsDebugger2
Dim dwPid As UInteger
Dim pOutputHandle As ULong
Dim returnValue As Integer

returnValue = instance.GetOutputHandleForProcess(dwPid, _
    pOutputHandle)
int GetOutputHandleForProcess(
    uint dwPid,
    out ulong pOutputHandle
)
int GetOutputHandleForProcess(
    [InAttribute] unsigned int dwPid, 
    [OutAttribute] unsigned long long% pOutputHandle
)
abstract GetOutputHandleForProcess : 
        dwPid:uint32 * 
        pOutputHandle:uint64 byref -> int 
function GetOutputHandleForProcess(
    dwPid : uint, 
    pOutputHandle : ulong
) : int

Parameters

  • pOutputHandle
    Type: System.UInt64%
    [out] Handle to the output device.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

Get a handle to use when redirecting stdout for a WinForms application. This will either be the console window or the output window, depending on user settings.

COM Signature

From vsshell80.idl:

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

.NET Framework Security

See Also

Reference

IVsDebugger2 Interface

IVsDebugger2 Members

Microsoft.VisualStudio.Shell.Interop Namespace