Re: Pointer to method C++ style

2009-07-23 Thread BLS
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(){}; //

Re: Pointer to method C++ style

2009-07-23 Thread Sergey Gromov
Thu, 23 Jul 2009 12:37:42 +0200, BLS wrote: Sergey Gromov wrote: Use case: I'm writing an ActiveX plug-in for a dynamic language. The 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 ?

Re: Pointer to method C++ style

2009-07-23 Thread Sergey Gromov
Thu, 23 Jul 2009 04:11:14 + (UTC), BCS wrote: Hello Sergey, Is there a way to declare and statically initialize some sort of pointer to method, and later call it for an actual object instance? dosn't work but might point you in the right direction: template Pn2Fn(R, char[]

Re: Pointer to method C++ style

2009-07-23 Thread Steven Schveighoffer
On Wed, 22 Jul 2009 23:47:30 -0400, Sergey Gromov snake.sc...@gmail.com wrote: Is there a way to declare and statically initialize some sort of pointer to method, and later call it for an actual object instance? I don't know why the non constant expression error happens, but constructing

Re: Pointer to method C++ style

2009-07-23 Thread BLS
Sergey Gromov wrote: Thu, 23 Jul 2009 12:37:42 +0200, BLS wrote: Sorry, I'm not a guru at all, so ActiveX was a misnomer. What I'm writing is a simple in-process server DLL which implements a couple of interfaces. Oh, that's sad. :( well, especially in this case I would suggest to have a

Re: Pointer to method C++ style

2009-07-23 Thread Sergey Gromov
Thu, 23 Jul 2009 19:07:43 +0200, BLS wrote: Sergey Gromov wrote: Sorry, I'm not a guru at all, so ActiveX was a misnomer. What I'm writing is a simple in-process server DLL which implements a couple of interfaces. Oh, that's sad. :( well, especially in this case I would suggest to have

Re: Pointer to method C++ style

2009-07-23 Thread Sergey Gromov
Thu, 23 Jul 2009 11:54:40 -0400, Steven Schveighoffer wrote: On Wed, 22 Jul 2009 23:47:30 -0400, Sergey Gromov snake.sc...@gmail.com wrote: Is there a way to declare and statically initialize some sort of pointer to method, and later call it for an actual object instance? I don't know