Using COM objects without separate DLLs

  • Thread starter Thread starter Mirco
  • Start date Start date
M

Mirco

In a previous post, Dmitriy Lapshin told:

"You can generate the source files for the interop DLL and include them into
your project (to a separate folder, probably), so you will still benefit
from Interop amenities but do away without creating a separate DLL".

Could anyone explain how to generate those classes?
Thanks a lot

Mirco
 
Micro,

I think that Dmitriy might have been mistaken.

If you run TLBIMP.exe on the type library or COM dll, then it will
create an interop assembly. In order to get source code from that, you
would have to run that assembly through a decompiler, and then add those
source files to your code.

If you don't run a decompiler, then you could disassemble the code,
using ILDASM. However, this will produce IL files, and not C# files, and
you would have to edit the IL code.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top