Solved

Using COleDispatchDriver in an API application

Posted on 1998-03-30
2
262 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
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

Suggested Solutions

Title # Comments Views Activity
Detect CR LF to each line 12 176
while loop over for loop 7 116
Problem to open Excel file 15 227
JQuery serialize and unserialize 8 201
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.

726 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