_ATL_FUNC_INFO Structure


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at _ATL_FUNC_INFO Structure.

Contains type information used to describe a method or property on a dispinterface.

struct _ATL_FUNC_INFO {
    CALLCONV cc;
    VARTYPE vtReturn;
    SHORT nParams;

The calling convention. When using this structure with the IDispEventSimpleImpl class, this member must be CC_STDCALL. CC_CDECL is the only option supported in Windows CE for the CALLCONV field of the _ATL_FUNC_INFO structure. Any other value is unsupported thus its behavior undefined.

The variant type of the function return value.

The number of function parameters.

An array of variant types of the function parameters.

Internally, ATL uses this structure to hold information obtained from a type library. You may need to manipulate this structure directly if you provide type information for an event handler used with the IDispEventSimpleImpl class and SINK_ENTRY_INFO macro.

Given a dispinterface method defined in IDL:

   HRESULT SomeFunction([in] long Number, [in] BSTR String);

you would define an _ATL_FUNC_INFO structure:

      _ATL_FUNC_INFO info = {CC_STDCALL, VT_EMPTY, 2, {VT_I4, VT_BSTR} };

Header: atlcom.h

IDispEventSimpleImpl Class