比如:
InvokeHelper(DISPID_REFRESH, DISPATCH_METHOD, VT_EMPTY, NULL, NULL)
帮帮忙,可以吗?
void InvokeHelper( DISPID dwDispID, WORD wFlags, VARTYPE vtRet, void* pvRet, const BYTE FAR* pbParamInfo, ... );
throw( COleException );
throw( COleDispatchException );
Parameters
dwDispID
Identifies the method or property to be invoked. This value is usually supplied by ClassWizard.
wFlags
Flags describing the context of the call to IDispatch::Invoke. For possible values, see the Platform SDK.
vtRet
Specifies the type of the return value. For possible values, see the Remarks section.
pvRet
Address of the variable 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.
...
Variable list of parameters, of types specified in pbParamInfo.
Remarks
Calls the object 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.
msdn中关于mfc封装的函数的说明
要学会用msdn