Using COM component in non MFC program. 
Author Message
 Using COM component in non MFC program.

Hello,

I want to use a COM component in a non MFC program (an other COM for
example).  I to use the class wizard to import classe but VC refuse to
compile because COleDispatchDriver (the base class) is undefined because
this classe is defined in <afxdisp.h> but I can't include this file that is
only for use in MFC program.

Their must be another way to do it (using the virtual table instead of
IDispatch for example) but I don't know it.

Thank you for your answer.




Sun, 12 Jan 2003 03:00:00 GMT  
 Using COM component in non MFC program.
The simplest way is to #import the COM component's type
DLL/type-library.  Look up the #import directive for more on this.
#import will generate some handy wrapper functions for you that make
it easy to call the IDispatch-based interface.

Alternatively ATL also has an equivalent of COleDispatchDriver.  Look
up CComDispatchDriver

Joe


Quote:
> Hello,

> I want to use a COM component in a non MFC program (an other COM for
> example).  I to use the class wizard to import classe but VC refuse
to
> compile because COleDispatchDriver (the base class) is undefined
because
> this classe is defined in <afxdisp.h> but I can't include this file
that is
> only for use in MFC program.

> Their must be another way to do it (using the virtual table instead
of
> IDispatch for example) but I don't know it.

> Thank you for your answer.





Sun, 12 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. using MFC functions in non-MFC programs

2. Using CDaoDatabase/CDaoRecordset from inside an ATL/MFC COM Component

3. Using VC for non MFC program

4. Win95 VC++ MFC program hangs using COM port

5. Using Word components on non-Word computer

6. Using non-MFC DLL in MFC app

7. Calling MFC DLLs from non-MFC programs

8. using MFC in non-MFC app

9. CAsyncSocket in an MFC DLL used in a non-MFC Application

10. Calling mfc library from non-mfc program

11. Loading a static-mfc-dll using ocx in a non-mfc application

12. Using a MFC DLL in a non-MFC application

 

 
Powered by phpBB® Forum Software