Mike,
AFAIK, there is no API that will do this for you.
Rather, the easiest way I can think of is to call the static
GetCurrentProcess method on the Process class and then access the
MainWindowHandle property on the Process instance returned.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> In a DLL written in C#, how can you get the handle of the main window
> of the app that called you?
>
> Thanks,
> Mike
Mike - 26 Nov 2007 20:45 GMT
That seems to work. Thanks!
On Nov 26, 3:21 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.com> wrote:
> Mike,
>
[quoted text clipped - 15 lines]
>
> - Show quoted text -