Hi All,
- I am working on a tool that manipulate managed assemblies, some of the
functionality provided by the tool require manipulating the metadata sections
of the managed assembly in a way it could still be loaded by the consuming
application ( concerning the manipulated assembly is a DLL ), The tool uses
the unmanaged profiling API to monitor the application being executed ( and
actively effect it ), for each assembly being loaded an AssemblyLoadStarted &
AssemblyLoadFinished are being called. for the manipulated assembly none of
these events is called, an 'Object reference is set to null' exception is
being thrown when trying to instantiate one of the classes defined in the
manipulated assembly... I wonder what parameters are extracted from a managed
assembly by the .NET framework during the loading process ( and NOT through
class instantiation and method calls of that assembly ), In other words: what
is the process that take place from the point where the assembly file is
being opened ( e.g. CreateFileW ) to the point where the profiler
AssemblyLoadFinished callback is being called? what parts of metadata of the
assembly being loaded is being used by the .NET Framework? What metadata
properties are required so the assembly would load successfully ( e.g.
NameSpace, PublicKey, version, … )? My guess is that I am manipulating some
variables that prevent the assembly from being loaded, the metadata
manipulation involve merging large chunks of metadata from other assemblies
so it is hard to pinpoint what exactly causes this phenomenon…
- SOooo, any pointers samples or explanations of the metadata properties
required during managed assembly load ( the process that take place from
assembly file creation until AssemblyLoadFinished execution ) would be
appreciated.
--
Nadav
http://www.ddevel.com