Notifies the profiler that a module is being attached to its parent assembly.
HRESULT ModuleAttachedToAssembly( [in] ModuleID moduleId, [in] AssemblyID AssemblyId);
[in] The ID of the module that is being attached.
[in] The ID of the parent assembly to which the module is attached.
A module can be loaded through an import address table (IAT), through a call to
LoadLibrary, or through a metadata reference. As a result, the common language runtime (CLR) loader has multiple code paths for determining the assembly in which a module lives. Therefore, it is possible that after ICorProfilerCallback::ModuleLoadFinished is called, the module does not know what assembly it is in and getting the parent assembly ID is not possible. The
ModuleAttachedToAssembly method is called when the module is attached to its parent assembly and its parent assembly ID can be obtained.
Platforms: See System Requirements.
Header: CorProf.idl, CorProf.h
.NET Framework Versions: Available since 2.0
Send feedback about: