CW 6.1 IDE automation.

Started by Roberto Bonacina December 21, 2004
I posted this message even to the Metrowerks Community Forum (the
general one), but no response until now.

I'm currently using CodeWarrior 6.1.2 for 56800.
I would like to automate the IDE, using COM interface inside a C/C++
program compiled with GCC.
I read examples, but they are for Perl.
I tried to do automation, but I found some problems.
I should do the following:
a. Generate a .idl file with Microsoft OLE/COM Object Viewer, based on
codewarrior.tlb file.
b. Generate .c and .h files with Microsoft MIDL, from .idl file.
c. Use .c and .h in my C/C++ program, using COM features.

The problems were the following:
1. The .idl file was difficult to compile with MIDL (a lot of errors): I
had to move the interfaces outside the "library CodeWarrior" section and
to move type definitions at the beginning of the "library CodeWarrior"
section in the .idl file (otherwise MIDL didn't produce .c and .h
2. The .idl file contains some interfaces already defined elsewhere
(IStream and ISequentialStream), so I don't know which one to keep.
3. the .idl file had some other incorrectness, adjusted by hand.

Finally, a .c and a .h were generated with MIDL, but I touched various
parts of .idl file to make them, so I don't think the result can be

Could someone give me feedback? Something wrong in my procedure?
Something wrong in the original codewarrior.tlb file?
Please let me know.

Best Regards,