DebugConnect function

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.


HRESULT DebugConnect(
  PCSTR  RemoteOptions,
  REFIID InterfaceId,
  PVOID  *Interface



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.


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.


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
The method was successful.


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


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

See also

Client Objects

Process Server and Smart Client