How to tell if a compiled DLL was created with .NET

G

Guest

With COM DLLs you can loadlibrary and then find the entry point for DLLRegisterServer to find out if it's self-registering. If a DLL is created with .NET, how can you find out if it is created with .NET and whether it has a strong name, etc.
 
M

Mattias Sjögren

If a DLL is created with .NET, how can you find out if it is created with .NET

If you mean from C++, see "Interoperability", "Is there any way to
find out if a given DLL is managed or unmanaged without trying to load
it?" at

http://msdn.microsoft.com/library/e...gedextensionsforcfrequentlyaskedquestions.asp

and whether it has a strong name, etc.

Mscoree.dll exports a bunch of functions for working with strong
names. See StrongName.h in the .NET Framework SDK include directory.



Mattias
 
A

AlexS

I would suggest to take a look at PE format for .Net assemblies - by
analyzing header you can find out all these things without resorting to
reflection.

HTH
Alex
 

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

Top