Groups | Blog | Home
all groups > dotnet clr > may 2004 >

dotnet clr : Get assembly location from IMetaDataImport


Brian Tyler
5/26/2004 9:31:19 AM
Technically, the "Assembly" has no location as it is a logical concept - it
is really a grouping of modules (although most assemblies today are simply
single-module assemblies). Also, the IMetaDataImport API is directly related
to reading the meta data itself and the meta data is location independent.
Remember that .NET uses a structured "directory probe" approach to finding
the modules it needs based on the location of the EXE.

However, if you are using this API in conjunction with the profiling API,
you can get the location the module was loaded from via the
ICorProfilerInfo->GetModuleInfo() call (the name of the module is a full
path). This only works during runtime as that is the time when the module
location will be resolved.

[quoted text, click to view]

Yang
5/26/2004 12:28:52 PM
Hi,
does anybody know how to get the assembly file location from the SDK
interface IMetaDataImport? I can get the module name, the assembly name, but
didn't find a way to get the location.

Thanks.
Yang

AddThis Social Bookmark Button