Possible to read meta from assembly without loading it?

G

Guest

I was wondering if its possible to extracts metadata from an assembly without
loading it. For example: consider an app which loads dlls from a specified
directory and is only interested in dlls from a specific vendor. Can I
retrieve this information on a file-level. I could of course create a
separate AppDomain and sandbox the dlls, extract metadata and unload the
appdomain, then reload the assemblies i'm interested in. The operation is
done at startup, and such an approach would generate a lot of overhead at a
time where speed is of essence. Any alternative suggestions?
 
V

Vadym Stetsyak

Hello, MariusI!

M> I was wondering if its possible to extracts metadata from an assembly
M> without loading it. For example: consider an app which loads dlls from a
M> specified directory and is only interested in dlls from a specific
M> vendor. Can I retrieve this information on a file-level.

Look at IMetaDataImport and related interfaces. See

%FrameworkSDKDir%\Tool Developers Guide\docs\Metadata Unmanaged
API.doc

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 

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