This is ofcourse a WINLift-project....
I have the need to "bundle" an application into a DLL
-------------
Fred
mailto:[email protected][email protected]</A>
http://www.oxenby.se
[This message has been edited by Fred Oxenby (edited May 25, 2000).]
I have the need to "bundle" an application into a DLL
Code:
[b]Question #1:[/b] When the DLL is loaded a thread is created in which a Window (form in VB) is created and a messagepump is started. The Window (form) is initially hidden (%SW_HIDE) This form is aktivated/deactivated via methodes in the DLL (%SW_SHOW/%SW_HIDE) When this DLL is unmapped (Freelibrary or application end) Is it then neccesary to destroy the windows (this does not work) and terminate the messagepump? ----------- [b]Question #2:[/b] Look at this code and especially the Global ghDlg& thing, and explain to me why: ghDlg& is a "local" variable in Callback Function CBButton but ghDlg& is a "global" variable in CBButton1 #Compile Exe #Include "..\common\Win32Api.bas" Declare Function OPT_SHOWTRANSFORM Lib "FOX$TRAN.DLL" _ (ByVal FileServer$,ByVal Transaktion$)As Long Declare Function OPT_INIT Lib "FOX$TRAN.DLL" _ (ByVal hWndParent&,FileServer$)As Long Declare CallBack Function CBBUTTON1 CallBack Function CBBUTTON #Register None Call OPT_INIT(ghDlg&,"\\NTSERVER\DATA\") Sleep 500 Call opt_showtransform("\\NTSERVER\DATA\","19990511 12:13:14 00033702 Zvvg01.ffa ZSBI01.OMI XXXXXXXXXX") End Function [b]Global ghDlg&[/b] Function PbMain() As Long DIALOG NEW 0,"TEST",,,600,400,%WS_CAPTION Or %WS_SYSMENU Or %WS_MINIMIZEBOX TO ghDlg& ' Call OPT_INIT(ghDlg&,"\\NTSERVER\DATA\") CONTROL ADD BUTTON, ghDlg&, 100&,"TRYCK",10,10,40,20, call CBButton CONTROL ADD BUTTON, ghDlg&, 101&,"TRYCK1",10,40,40,20, call CBButton1 Dialog Show modal ghDlg& End Function CallBack Function CBBUTTON1 #Register None Call OPT_INIT(ghDlg&,"\\NTSERVER\DATA\") Sleep 500 Call opt_showtransform("\\NTSERVER\DATA\","19990511 12:13:14 00033702 Zvvg01.ffa ZSBI01.OMI XXXXXXXXXX") End Function
-------------
Fred
mailto:[email protected][email protected]</A>
http://www.oxenby.se
[This message has been edited by Fred Oxenby (edited May 25, 2000).]
Comment