How do I get the Windows HINSTANCE handle?
-
wrote on 29 Mar 2011, 16:04 last edited by
Hi Guys,
I am integrating an SDK that requires access to the HINSTANCE handle that Win32 provides in its WinMain call like this:WinMain(HINSTANCE hInstance,.....I have tried QApplication::instance(), but that doesn't seem to be satisfactory to the SDK that needs the handle.
Does anyone know what procedure I need to call?Thank you, :)
Chris -
wrote on 29 Mar 2011, 17:52 last edited by
So I think you are looking for "WId QWidget::winId () const" from your mainwindow and not from the application object.
-
wrote on 29 Mar 2011, 18:07 last edited by
If you really need the HINSTANCE, you can use
@
HINSTANCE hInstance = (HINSTANCE)::GetModuleHandle(NULL);
@ -
wrote on 30 Mar 2011, 13:58 last edited by
Thank you both.
I have tried both solutions (plus about 3 others), but the SDK doesn't seem to be responding. I believe I will need to compile and debug within the SDK - something else must be going on.
Thanks agian for your help and quick replies - sincerely appreciated! :)
Chris
1/4