mphanke,
I am curious, why not use SHGetFile info? It will get the icon
associated with a file, and take into account shell handlers and the like
(unlike ExtractAssociatedIcon). Also, you don't need an application handle.
If you still want to get the HINSTANCE, then you will have to get a
module from the application (through a call to the GetModule or GetModules
method on the Assembly class) and pass that to the static GetHINSTANCE
method on the Marshal class.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"mphanke" <mp*****@nospam.nospam> wrote in message
news:OO**************@TK2MSFTNGP12.phx.gbl...
Hi,
how do I get the HINSTANCE for an .NET application?
ExtractAssociatedIcon always complains about an missing pointer
reference...
Regards,
Martin