Is it possible to have read-access to assemblies modules raw files loaded in memory by the CLR?
I don't ask for Reflection here, I ask for read-access to raw modules files (.dll and .exe) loaded in memory by the CLR. If it is possible I guess I'd need somehow some unmanaged code (and this would be ok to use unmanaged code for that).
I guess this can be done through CLR hosting, but I'd prefer a solution without CLR hosting if possible, a solution where my .NET code would invoke some unmanaged code (with an input such as Assembly.GetExecutingAssembly().GetModules().First().ModuleHandle
) and get back a pointer to the file location in memory (assuming the CLR doesn't move such loaded file).