I use some code to run the CLR Runtime inside my own process, and then call my .NET DLL to load another .NET executable inside this process.
To load another .NET executable, I use reflection, for example:
Assembly.Load(file).EntryPoint.Invoke(null, null);
Now I insert a C ++ dll that launches the runtime, and then calls the .NET dll, which uses Assembly.Load to load another .NET executable into memory and execute it.
As soon as the DLL loads my .NET executable, it is called:
System.Reflection.Assembly.GetExecutingAssembly().Location;
or even
Process.GetCurrentProcess().MainModule.FileName;
, , , -. -? , -, , .
, DLL- .NET, , .
.
EDIT:
GetEntryAssembly() GetCallingAssembly().