CWnd::InvokeHelper

void InvokeHelper( DISPID dwDispID**, WORD** wFlags**, VARTYPE** vtRet**, void*** pvRet**, const BYTE*** pbParamInfo**,** ... );
throw( COleException );
throw( COleDispatchException );

Parameters

dwDispID

Identifies the method or property to be invoked. This value is usually supplied by Component Gallery.

wFlags

Flags describing the context of the call to IDispatch::Invoke. For possible wFlags values, see in the Win32 SDK OLE Programmer's Reference.

vtRet

Specifies the type of the return value. For possible values, see the Remarks section for COleDispatchDriver::InvokeHelper.

pvRet

Address of the variable that will that will receive the property value or return value. It must match the type specified by vtRet.

pbParamInfo

Pointer to a null-terminated string of bytes specifying the types of the parameters following pbParamInfo. For possible values, see the Remarks section for COleDispatchDriver::InvokeHelper.

...

Variable List of parameters, of types specified in pbParamInfo.

Remarks

Call this member function to invoke the ActiveX control method or property specified by dwDispID, in the context specified by wFlags. The pbParamInfo parameter specifies the types of the parameters passed to the method or property. The variable list of arguments is represented by ... in the syntax declaration.

This function converts the parameters to VARIANTARG values, then invokes the IDispatch::Invoke method on the ActiveX control. If the call to IDispatch::Invoke fails, this function will throw an exception. If the SCODE (status code) returned by IDispatch::Invoke is DISP_E_EXCEPTION, this function throws a COleException object, otherwise it throws a COleDispatchException.

Note   This function should be called only on a CWnd object that represents an ActiveX control.

For more information about using this member function with ActiveX Control Containers, see the article , in Visual C++ Programmer’s Guide.

CWnd OverviewClass MembersHierarchy Chart

See Also   CWnd::GetProperty, CWnd::SetProperty, COleDispatchDriver, CWnd::CreateControl