In general, the C ++ IDispatch interface is just a table of function pointers. In C, it looks something like this:
typedef struct {
HRESULT(*pQueryInterface)(void* this, REFIID riid, void **ppvObject);
ULONG(*pAddRef)(void* this);
ULONG(*pRelease)(void* this);
HRESULT(*pGetTypeInfoCount)(void* this, unsigned int* pctInfo);
HRESULT(*pGetTypeInfo)(void* this, unsigned int iTInfo,LCID lcid, ITypeInfo** ppTInfo);
HRESULT(*pGetIDsOfNames)(void* this, REFIID riid, OLECHAR** rgszNames, unsigned int cNames, LCID lcid, DISPID* rgDispId);
HRESULT(*pInvoke)(void* this, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags,DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, unsigned int* puArgErr);
} IDispatch_in_C;
Note that each method has this pointer as the first parameter, and you will need to define more types such as ITypeInfo, REFIID, DISPID, etc. etc.
, . ++- C.