Board index » delphi » Delphi programs prevent Windows from exiting!

Delphi programs prevent Windows from exiting!

A couple of my Delphi programs do not allow Windows to exit when the command
is given to shut down.  I believe that the problem lies in the DWinSock unit I
am using, but I am unable to trace it!  The de{*word*81} says "unable to break due
to hard mode" ... I assume that the program is not processing the
WM_ENDSESSION or WM_QUERYENDSESSION messages correctly -- does anyone know of
a set of circumstances that would cause these messages to be processed
wrong?

Thanks for any help!

---------------------------------------------------------------------
Steven E. Hugg
HAMCO Software

 

Re:Delphi programs prevent Windows from exiting!


h...@pobox.com (Steven E. Hugg) wrote:

Quote
>A couple of my Delphi programs do not allow Windows to exit when the command
>is given to shut down.  I believe that the problem lies in the DWinSock unit I
>am using, but I am unable to trace it!  The de{*word*81} says "unable to break due
>to hard mode" ... I assume that the program is not processing the
>WM_ENDSESSION or WM_QUERYENDSESSION messages correctly -- does anyone know of
>a set of circumstances that would cause these messages to be processed
>wrong?

There is a bug in the DWINSOCK code. The WHND that is allocated does
not process the WM_QUERYENDSESSION event. (DefaultProc does not do it
either). Just add a handler for that message in the message handling
routine.

============================================
Tony BenBrahim   Startech Computer Services
Internet Components for Borland Delphi
http://www.neosoft.com/~startech
============================================

Other Threads