use ATL wizard to implement an existing interface 
Author Message
 use ATL wizard to implement an existing interface

When using ATL to create a Simple Object,  the wizard will prompt for a
interface for this object to implement.
However, i want the CoClass to implement an existing interface. how could I
do that?


Fri, 29 Oct 2004 05:41:09 GMT  
 use ATL wizard to implement an existing interface
Go to the ClassView pane, right click on the C++ implementation class,
select implement interface, and either select the interface from the list or
ffirst browse for the type library containing the interface definition.

Note that you might need to have the pertinant files writable (in case
you're hooked up to source control). Also, note that if you're implementing
your own interface (i.e. in your project's type library), you'll need to
compile the .idl into your type library before doing taking the steps above.

Dirk


Quote:
> When using ATL to create a Simple Object,  the wizard will prompt for a
> interface for this object to implement.
> However, i want the CoClass to implement an existing interface. how could
I
> do that?



Sat, 30 Oct 2004 01:07:30 GMT  
 use ATL wizard to implement an existing interface
Specify a dummy interface, then hand-edit your IDL and header
files to remove it and specify your desired interface instead.
In the IDL import the IDL where your target interface is defined.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

Quote:

> When using ATL to create a Simple Object,  the wizard will prompt for a
> interface for this object to implement.
> However, i want the CoClass to implement an existing interface. how could I
> do that?



Sat, 30 Oct 2004 05:30:03 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Unable to use ATL wizard in VC6 after using ATL wizard in VC7 dot net beta2

2. implement a COM interface using ATL

3. Implement existing interface with MFC

4. implementing existing COM interfaces in C#

5. Implement Interface Wizard in VC 7.0

6. Implement Interface Wizard problems

7. Can't add more than one ATL object to an ATL project using wizard

8. use ATL Wizard implement broadcast connection point

9. How to make an interface inherite from another interface using ATL

10. ATL and Implementing Interfaces

11. How to implement several interface by one C++ class in VS7 ATL project

12. ATL local server implementing 2 interfaces derrived from IUnknown

 

 
Powered by phpBB® Forum Software