Help Center

AfxCAxHostDispObjfunction

Returns a reference to the control's default interface given the handle of the window that hosts it.

COMfunctionCaxHost.incdocumented

Syntax

FUNCTION AfxCAxHostDispObj (BYVAL hwnd AS HWND) AS IDispatch PTR

Parameters

NameDescription
hwndHandle of the window that hosts the ActiveX control. If you don't know the value of this handle, you can get it calling the AfxCAxHostWindow function.

Return value

IDispatch. A reference to the ActiveX control's default interface.

Description

Returns a reference to the control's default interface given the handle of the window that hosts it. This is a reference counted pointer, so you must release it calling the Release method of the interface, the IUnknown_Release macro or the AfxSafeRelease function.

Reference

  • Include file CaxHost.inc
  • Defined in AfxNova/CAxHost.inc:1322
  • Documented in COM/CAxHost Class.md
  • Topic: CAxHost Class