Mindaugas Kavaliauskas wrote:
This makes a little more light (to me) on the subject. Is this "dispinterface ICoBpTiEvents { ... }" a C++ syntax?

"OLE View" is an application supplied with Visual Studio 6 which displays type library information, I guess it might correspond to how the interface is described in IDL.

This extension will allow to use any interface, f.e., you can use:
__AXREGISTERHANDLER( pDisp, bHandler, "{F41DF7FB-5014-4859-B4DD-854A9D2143CC}" )
to connect to "Events interface for CoBpTi Object".

Yes, I see. That sounds suitable to me.

I do not like a solution that uses enumeration and returns first interface, without any knowledge about what kind of interface it is. We will GPF, if we receive interface not identical to IDispatch. But... OLE has surprises, so, it could be also a common practice... So, decision is for those who use it and knows how it works in practice.

Doesn't this code change below that Przemyslaw proposes take care of your 
concern?

      if( HB_VTBL( pCP )->GetConnectionInterface( HB_THIS_( pCP ) &rriid )
                                                                  == S_OK )
      {
         if( IsEqualIID( HB_ID_REF( rriid ), HB_ID_REF( IID_IDispatch ) ) )
            break;
      }


I must go and make supper!

Regards
Alex
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to