Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using COleDispatchDriver in an API application

Posted on 1998-03-30
2
Medium Priority
?
272 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 100 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

Industry Leaders: 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

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

722 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