Pointer to method C++ style

BLS windevguy at hotmail.de
Thu Jul 23 03:37:42 PDT 2009


Sergey Gromov wrote:
> Use case: I'm writing an ActiveX plug-in for a dynamic language.  The

> class Component : IUnknown

WOW!

But shouldn't you use

class Component : IDispatch
{
   HRESULT QueryInterface( REFIID riid, LPVOID * ppvObj) {};
   ULONG   AddRef() {};
   ULONG   Release(){};

   // plus IDispatch methods
   // GetTypeInfoCount, GetTypeInfo, GetIDsOfNames, Invoke.
   // to support late binding ?
}

instead ?

Beside, John C. (Juno library) is a specialist (guru) regarding this 
topic. maybe he is willing to help.

However, I am _very_ interested in having/seeing the source of a very 
basic ActiveX control. Any chance that you share the core implementation 
with us ?
björn




More information about the Digitalmars-d-learn mailing list