15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


ControlWizard-generated COM objects

Tim Lesher -- TimL@asymetrix.com
Thursday, October 24, 1996


Environment:  VC++ 4.2, NT 4.0 (x86)

OLE controls support the dual-interface model--they can be driven either   
by calls into their virtual function tables (vtbls), or by using the   
IDispatch mechanism.

I'm trying to support an in-house OCX within a non-MFC object (as a   
control in a property page).  The IDispatch mechanism is gross overkill   
here (in addition to being slower than vtbl control), so I'd like to   
drive the OCX by QueryInterface()ing for the object's private COM   
interface, and then calling its methods directly.

The ControlWizard's interface seems to be defined by the GUID   
IID_DI, but I can't find any definition of the interface.

What does the vtbl for a ControlWizard-generated IUnknown-based interface   
look like?  How can I figure out the correct order of methods, including   
the implicit getX/setX methods?  I'm assuming it's somehow related to the   
DISPATCH_MAP macros, but I haven't been able to decipher the MFC code on   
this point...

Thanks.

Tim Lesher
Asymetrix  




Stuart Downing -- sdowning@fame.com
Monday, October 28, 1996

I hate to say this, but I think it's time to hunker down, and read
all the info in the Tech Notes.  Start with TN038.
-------
Stuart Downing (formerly of Creative Solutions)
FAME Information Services, Inc.
sdowning@fame.com


----------
From:  Tim Lesher[SMTP:TimL@asymetrix.com]
Sent:  Thursday, October 24, 1996 3:43 PM
To:  'MFC List'
Subject:  ControlWizard-generated COM objects


Environment:  VC++ 4.2, NT 4.0 (x86)

OLE controls support the dual-interface model--they can be driven either   
by calls into their virtual function tables (vtbls), or by using the   
IDispatch mechanism.

I'm trying to support an in-house OCX within a non-MFC object (as a   
control in a property page).  The IDispatch mechanism is gross overkill   
here (in addition to being slower than vtbl control), so I'd like to   
drive the OCX by QueryInterface()ing for the object's private COM   
interface, and then calling its methods directly.

The ControlWizard's interface seems to be defined by the GUID   
IID_DI, but I can't find any definition of the interface.

What does the vtbl for a ControlWizard-generated IUnknown-based interface   
look like?  How can I figure out the correct order of methods, including   
the implicit getX/setX methods?  I'm assuming it's somehow related to the   
DISPATCH_MAP macros, but I haven't been able to decipher the MFC code on   
this point...

Thanks.

Tim Lesher
Asymetrix  






| Вернуться в корень Архива |