Lisp HUG Maillist Archive

Exiting from a DLL (Windows)

Hi

I am not much of a Windows programmer.

Anyway,  I have this application which works fine in stand alone (it 
has an interface etc etc).

However, when I make it into a DLL, it exhibits the following behavior.

I call the main function (the entry point of both the stand-alone app 
and of the DLL) and the interface is brought up with no problems.  Then 
I can interact with the application.  However

1 - (Minor point) The "calling application" - some C++ stuff - is 
frozen in the meanwhile.
2 - (Major mess) When I "exit" from the CAPI interface (close the 
window) the all application is brought down (since I call a QUIT).

I need suggestions about what would be the best way to achieve a better 
interoperability for the DLL case.  Any help appreciated.

Thanks


--
Marco Antoniotti
NYU Courant Bioinformatics Group		tel. +1 - 212 - 998 3488
715 Broadway 10th FL				fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.


Re: Exiting from a DLL (Windows)

Unable to parse email body. Email id is 847

Re: Exiting from a DLL (Windows)

On Thursday 06 February 2003 02:25 pm, Marco Antoniotti wrote:
> I call the main function (the entry point of both the stand-alone app

I've only every built things that work in the other direction (i.e. lisp calls 
a C/C++ DLL)  but here's a guess ...

> 2 - (Major mess) When I "exit" from the CAPI interface (close the
> window) the all application is brought down (since I call a QUIT).

Maybe what you need is the ":quit-when-no-windows nil" delivery option?  Doc 
(delivery user manual, section 5.2) says that the default is t, which might 
lead to the behaviour you describe.

Or, maybe the problem is that you've got a conflict over which program has 
control of the windows main message loop (which might explain why the C++ 
freezes when the lisp main loop kicks in).  I don't know how to fix this, if 
it is the problem.  I do know how to make C windows be subordinate to the LWW 
main loop and have some sample code - if you want to consider reversing the 
problem (lisp is the main, C++ is the dll).

pt


Updated at: 2020-12-10 09:00 UTC