VC中的com是这样的:
///////////////////////////
interface IAdd : IDispatch
{
[id(1), helpstring("method Add")] HRESULT Add([in] int a, [in] int b);
};
///////////////////////////////
STDMETHODIMP CAdd::Add(int a, int b)
{
// TODO: Add your implementation code here
Sleep(2000);   // to simulate a long process//OK, process over now; let's notify the client Fire_ExecutionOver(a+b);
return S_OK;
}
/////////////////////////////////
VB调用的
Dim WithEvents objTestATL As CONNECTIONCOMLib.AddPrivate Sub Command1_Click()
    Dim a, b As Long
    a = 1
    b = 2
    
    Dim res As Long
    res = objTestATL.Add(1, 2)
    
End SubPrivate Sub objTestATL_ExecutionOver(ByVal Result As Long)
    MsgBox CStr(Result)
End Sub
/////////////////////////////////////////////错误信息:
compile error:
expected function or variable怎么会出现这样的错误