Solved

Using COleDispatchDriver in an API application

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

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 (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now