Help Center

CDispInvoke.DispInvokemethod

Calls a method or a get property.

COMmethodCDispInvoke.incdocumented

Syntax

FUNCTION DispInvoke (BYVAL wFlags AS WORD, BYVAL dispIdMember AS DISPID, BYVAL prgArgs AS VARIANT PTR = NULL, BYVAL cArgs AS UINT = 0, BYVAL lcid AS LCID = LOCALE_USER_DEFAULT) AS HRESULT
FUNCTION DispInvoke (BYVAL wFlags AS WORD, BYVAL pwszName AS WSTRING PTR, BYVAL prgArgs AS VARIANT PTR = NULL, BYVAL cArgs AS UINT = 0, BYVAL lcid AS LCID = LOCALE_USER_DEFAULT) AS HRESULT

Parameters

NameDescription
wFlagsFlags describing the context of the Invoke call.
dispIDIdentifies the member. Use GetIDsOfNames or the object's documentation to obtain the dispatch identifier.
pwszNameThe name of the method or property to call.
prgArgsArray of variant parameters in reversed order.
cArgsThe number of arguments in the prgArgs array.
lcidThe locale context in which to interpret arguments. The lcid is used by the GetIDsOfNames function, and is also passed to Invoke to allow the object to interpret its arguments specific to a locale. Applications that do not support multiple national languages can ignore this parameter.

Description

Calls a method or a get property.

Remarks

Extracts and returns the encapsulated interface pointer, and then clears the encapsulated pointer storage to NULL. This removes the interface pointer from encapsulation. It is up to the caller to call Release on the returned interface pointer.

This method is called internally by the Get, Put, PutRef and Invoke methods of the CDispInvoke class. You don't need to call it directly.

Reference

  • Include file CDispInvoke.inc
  • Defined in AfxNova/CDispInvoke.inc:755
  • Documented in COM/CDispInvoke Class.md
  • Topic: CDispInvoke Class