DebugCreate function (dbgeng.h)

The DebugCreate function creates a new client object and returns an interface pointer to it.

Syntax

HRESULT DebugCreate(
  [in]  REFIID InterfaceId,
  [out] PVOID  *Interface
);

Parameters

[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 other error values. See Return Values for more details.

Return code Description
S_OK
The function was successful.
E_NOINTERFACE
The client object doesn't implement the specified interface.

Remarks

The parameters passed to DebugCreate are the same as those passed to IUnknown::QueryInterface, and they are treated the same way.

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.

The debugger engine client interfaces cannot be obtained by calling CoCreateInstance, CoCreateInstanceEx, or CoGetClassObject. Use DebugCreate, DebugCreateEx, DebugConnect, or DebugConnectWide to create such an interface, or call IUnknown::QueryInterface on another debugger engine client interface.

Requirements

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

See also

Client Objects