Link to home
Start Free TrialLog in
Avatar of derekl
derekl

asked on

Using COleDispatchDriver in an API application

I have written an application, which does no use MFC, to which I would like to add some OLE automation functionality.  Rather than messing around with IDispatch->Invoke and GetIDsOfNames etc.. I decided to use class wizard to generate some wrapper classes, inheriting from COleDispatchDriver, from the excel8.olb type library.  That worked fine, but I ran into all kinds of collisions when I tried to compile, because my existing code #includes "windows.h".  Since COleDispatchDriver does not descend from any other MFC class, I figured I could use it without having to #include "stdafx.h".  Is this possible, and if so how do I do it?  Also, I found the implementation for COleDispatchDriver in OleDisp2.cpp, but where is the header file?

Also, are the IDispatch interfaces exposed in the Office97 apps such as Word, and excel available as dual interfaces which I can access directly throught the vtable?
Avatar of derekl
derekl

ASKER

Edited text of question
ASKER CERTIFIED SOLUTION
Avatar of galkin
galkin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial