[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== Getting the Instance Handle for OpenInsight??? (OpenInsight Specific) ==== === At 26 MAY 1999 07:05:17AM Geoff Gullick wrote: === {{tag>"OpenInsight Specific"}} 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 [url=http://www.sprezzatura.com]Sprezzatura Group[/url] [img]http://www.sprezzatura.com/zz.jpg[/img] ---- === 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 [url=http://www.sprezzatura.com" ]Sprezzatura Group[/url] [i]World Leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=3091DD12F8E3D81E8525677D003CE8A4|View this thread on the forum...]]