How do I get the Windows HINSTANCE handle?
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, :)
So I think you are looking for "WId QWidget::winId () const" from your mainwindow and not from the application object.
If you really need the HINSTANCE, you can use
HINSTANCE hInstance = (HINSTANCE)::GetModuleHandle(NULL);
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! :)