Getting the Instance Handle for OpenInsight??? (OpenInsight Specific)
At 26 MAY 1999 07:05:17AM Geoff Gullick wrote:
I am adding some functions to a DLL and need to pass in my apps instance handle as a HINSTANCE. Is there a way to do this??
At 26 MAY 1999 04:10PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:
I think it should Handle=Get_Property( Window, 'HANDLE')
akaplan@sprezzatura.com
At 27 MAY 1999 05:05AM cpates@sprezzatura.com,[url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:
Hi Geoff,
You need to get the handle of a window in your app and then you need to get the app's instance handle which is different from a window handle).
To do this use Aaron's code to get the window handle then use the GetWindowWord API call with the GWW_HINSTANCE argument to get the HINSTANCE of the app that owns the window.
eg.
Equ GWW_HINSTANCE$ To -6
hWnd=Get_property( "SOMEWIN", "HANDLE" )
hInstance=GetWindowWord( hwnd, GWW_HINSTANCE$ )
You'll probably have to prototype GetWindowWord as
SHORT PASCAL GetWindowWord( SHORT, SHORT )
in DLL_USER in SYSPROCS.
One other thought - do you need the HINSTANCE of OpenInsight( ie PResentation server - which owns the windows you create ) or OpenEngine, which runs the scripts and programs that call your DLL's ? ) Hmmm….
cpates@sprezzatura.com
World Leaders in all things RevSoft