How does CreateStdDispatch know what method to invoke?
i'm faced with implementing an IDispatch interface. There are four methods, and fortunately 3 of them are easy: function TIEEventsSink.GetTypeInfoCount(...): HResult; { Result := E_NOTIMPL; } function TIEEventsSink.GetTypeInfo(...): HResult; { Result := E_NOTIMPL; } function TIEEventsSink.GetIDsOfNames(...): HResult; { Result := E_NOTIMPL; } It's the last method, Invoke that is difficult. Here i am faced with having to actually case the DispID , and call my appropriate method; unmarhsalling parameters from a variant array. function Invoke( dispIdMember: DISPID; riid: REFIID; lcid: LCID; wFlags