How can I generate C # source code for COM Interop library instead of assembly?

When importing a COM library (either directly from tlbimp or indirectly with a visual studio link dialog), is there a way to generate C # source code instead of the binary interop assembly, for example, Interop.Word.dll?

UPD: a reflector is a bad idea. The problem is that for the com interface this is not only a signature, but also the order of the members. Reflector violates this order

+3
source share
3 answers

I would like to continue building interop using TLBIMP and use Reflector to parse it. As you will see, the interop assembly does not have real implementation code. Then you can simply copy and paste the code (or CoClasses and the interfaces you need) into the new .cs file in your project.

+1
source

You cannot generate C # directly, but if your real problem is that you need to configure the interop library, you might be lucky using the CLR Interop special TLB-command for the command line - this is quite flexible and you have a full source [ to him.]

http://clrinterop.codeplex.com/releases/view/17579

. , ( ) , interop . ? .

0

, . # , . , . #, , ++.

,

0

All Articles