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

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

Sprezzatura Group

www.sprezzatura.com_zz.jpg


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

Sprezzatura Group

World Leaders in all things RevSoft

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/3091dd12f8e3d81e8525677d003ce8a4.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1