Does anyone know of a commandline-tool that generates an idl file from a type library (.tlb)? The reason for doing this is to get rid of underscores in enum-values generated from regasm. The problem with underscores in enums is discussed in this blog
http://blogs.artinsoft.net/mrojas/archive/2010/05/17/interop-remove-prefix-from-c-enums-for-com.aspx
I know that OLEView can generate IDL files, but i'm looking for a solution that can fit into an automatic build.
I doubt that the is a tool that does exactly what you want. But it should not be too hard too roll your own converter. Working with type libraries is a bit cumbersome. I wrote a tool that generated C++ wrapper classes for COM interfaces either from .idl files or from .tlb files. The code that reads out the relevant information of the interface is about 250 lines of code, so if you add some code to generate a .idl file you should end up with about 1000 lines of code.
The following code is a cut down version of my C++ code that should give you the general idea. However, since I don't have access to a compiler at the moment, I could not check whether it compiles (unlikely) or works (certainly not).
Regards, Stuart