• Advertisement
Sign in to follow this  

[.net] hInstance in a Forms App

This topic is 4109 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it possible to get the hInstance for an application using VC++ 2005 .NET? I tried using: #include <windows.h> int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { ... } but it rejects pretty much everything in windows.h.

Share this post


Link to post
Share on other sites
Advertisement
Perhaps

System.Diagnostics.Process.GetCurrentProcess().Handle

does the trick...

Cheers

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement