DebugConnect function (dbgeng.h)

The DebugConnect and DebugConnectWide functions create a new client object and return an interface pointer to it. The client object will be connected to a remote host.

Syntax

HRESULT DebugConnect(
  [in]  PCSTR  RemoteOptions,
  [in]  REFIID InterfaceId,
  [out] PVOID  *Interface
);

Parameters

[in] RemoteOptions

Specifies how the debugger engine will connect to the remote host. These are the same options that get passed to the -remote option on the command line. For details on the syntax of this string, see Activating a Debugging Client.

[in] InterfaceId

Specifies the interface identifier (IID) of the desired debugger engine client interface. This is the type of the interface that will be returned in Interface. For information about the interface identifier, see Using Client Objects.

[out] Interface

Receives an interface pointer for the new client. The type of this interface is specified by InterfaceId.

Return value

This method may also return error values. See Return Values for more details.

Return code Description
S_OK
The method was successful.

Remarks

As with IUnknown::QueryInterface, when the returned interface is no longer needed, its IUnknown::Release method should be called.

You don't need to call CoInitialize, CoInitializeEx, or OleInitialize to use this function and interfaces obtained by it.

Requirements

Requirement Value
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h)

See also

Client Objects

Process Server and Smart Client