I have a C# NET dll in which I need to know the name of the application
(process) that loaded (is executing) my dll.

In one case, the dll gets loaded in a rather complicated manor. I.e. a MFC
application loads an IE browser and then script calls NET components exposed
as COM dlls. These dlls in turn load mine. How can I know the name of that
MFC exe that started this?

-dh

Re: How to know calling process name? by Robert

Robert
Thu Sep 09 15:00:29 CDT 2004

David Hoffer wrote:

> I have a C# NET dll in which I need to know the name of the application
> (process) that loaded (is executing) my dll.
>
> In one case, the dll gets loaded in a rather complicated manor. I.e. a MFC
> application loads an IE browser and then script calls NET components exposed
> as COM dlls. These dlls in turn load mine. How can I know the name of that
> MFC exe that started this?
>


System.Diagnostics.Process.GetCurrentProcess().ProcessName

bye
Rob