• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 339
  • Last Modified:

Getting OWL app's hInstance

I am having a big time problem trying to get the HINSTANCE of my OWL app! All I need it for is to send it to TDib's constructor so I can load a TDib from my resources. I have tried using many techniques, including using GetWindowClass(), and GetWindowLong(). I keep getting General Protection Faults every time I try to get the HINSTANCE. Please Help!
1 Solution

I use that code

HINSTANCE hInstance = *GetApplication();    // from application
HINSTANCE hInstance = ::Module->GetInstance();  // from DLL

Hope this helps!

eppsmanAuthor Commented:
Thanks! It worked!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now