Enumerating references without loading the assembly

A

Aleksander Oven

Hi,

I'm trying to perform some checks before loading an assembly into my
native process. One of the main things I'd like is to enumerate the list
of referenced assemblies.

I've googled for everything I could think of, but all I got was examples
based on reflection. This is no good to me, since I have to do this
before actually loading the assembly. If you're wondering why, look up
my other message in this group, titled ".NET framework version vs. the
CLR version".

Anyway, I found a method of the Assembly class, called
ReflectionOnlyLoadFrom(), but I can't use it from unmanaged code,
because the _Assembly interface doesn't expose it. It's probably a
static method, so I kind of understand why it can't. Nevertheless, it's
probably the closest thing to what I need.

Are there other ways to walk the manifest without loading the assembly?

If all else fails, I'm willing to manually parse the manifest stream,
provided someone shows me a way to find it inside the PE image and
points me to a detailed documentation of the format.
 

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