Partager via


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

'Declaration
Function GetOutputHandleForProcess ( _
    dwPid As UInteger, _
    <OutAttribute> ByRef pOutputHandle As ULong _
) As Integer
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

  • dwPid
    Type: UInt32

    [in] Process ID of the application.

  • pOutputHandle
    Type: UInt64%

    [out] Handle to the output device.

Return Value

Type: 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 Windows Forms 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

Microsoft.VisualStudio.Shell.Interop Namespace