Re: Generate C++ code from existing IDL
Well, there isn't an ATL wizard that does exactly what you
want. You can use some wizards but tyou have to clean up
after them. E.g you need to create new objects and delete
all traces of the new interfaces that the wizard creates for
you, then implement the existing interfaces. Then you need to
reconcile the two IDL files. I'd suggest you create all your
objects and then add the existing IDL file to your project
(assuming it only defines interfaces, not coclasses within
a type library...), since the ATL wizards cannot deal with a
project with multiple IDL files.
If OTOH you were given a complete IDL with all interfaces
and all coclasses, then simply add duplciates of all coclasses
in a new ATL project using all the same names as in the
original IDL file. Then delete the entire IDL file created for
you by the wizard and replace it by the one given to you
to implement. If you created all the methods in all the
interfaces using the add new method wizard, that's all
you need to do (assuming you haven't mistyped anything)
and you should be able to compile. If you only added the
interfaces, but not their methods, you can do so by hand
at this point.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================
<vedran.bratic@gmx.net> wrote in message
news:1181559418.424395.314230@q75g2000hsh.googlegroups.com...
Hi,
I was given an IDL file and was asked to implement it.
How can I create a Project with VS2005, load the IDL somehow and let
VS2005 generate the classes with empty methods.
After that I just have to implement each method.
That should actually be possible, because all the information about
the classes already exists in the IDL-file, right?
Can somebody help me or give me a hint?
Thanks,
Vedran