Hi,

I'm currently fooling around with the unmanaged metadata API and need to
Extract IL for functions inside an assembly. Using IMeteDataImport, 
I'm able to get the method props including the RVA for the code. Now, I need
to look it up in the image of the assembly. 

I'm trying to use the DbgHelp library, specifically the ImageNtHeader
function. 
This functions takes a pointer to the image's base. As the docs state,
normally ones 
uses the MapViewOfFile function to get to that info.

I was wondering, since I used IMetaDataDispenserEx->OpenScope to actually
get to the MetaData, 
The image HAS been loaded. Is there a way I can retrieve the image's base
adress from there? Or do 
I need to Map the file myself? 

Or maybe I'm completely off track. Maybe a more generic question is in
order. Is there 
An easier way to extract the IL bytes from an assembly? 

Any pointers or insight?

Cheers
Frederic


Fr�d�ric Gos
Senior Software Architect
Composite Netsystems

Phone: +45 35 55 23 52
Mobile: +45 20 91 67 71
-----------------------------------------------------------------------
Learn more about Composite on www.composite.net

Reply via email to