Solved

Using COleDispatchDriver in an API application

Posted on 1998-03-30
2
268 Views
Last Modified: 2013-11-20
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?
0
Comment
Question by:derekl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:derekl
ID: 1317329
Edited text of question
0
 
LVL 7

Accepted Solution

by:
galkin earned 50 total points
ID: 1317330
first i am sure any Office Automation object exposes dual interface since Microsoft states dual interface should be implemented wherever possible. COleDispatchDriver is defined in afxdisp.h. I suppose afxole.h MFC file must be included before afxdisp.h
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question