Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with NMUdp in Delphi 6 prof.

Status
Not open for further replies.

walker2

Programmer
Oct 28, 2006
43
DK
My application works fine, except if I forget to manually close it down, when I want to close down the PC.

Win XP (and 2000) is not able to shut the application down.

If I from another application send a wmClose, it works, but the more special messages used at close down, are not captured.

Is there a way around this, or should I start using another component instead?

For some reason I do not have the source code for the NMUDP component :-(
 
Apparently there is a problem with this component causing the effect you describe.
Though XP is usually pretty good at knocking stuff on the head (eventually).
Windows sends WM_EndSession and WM_QueryEndSession messages to running programs at shutdown.
It may be possible for you program to detect this? If you can then you can force a shutdown internally.
This will cause a OnCloseQuery event. and allow windows to shut it down.
I think this will depend on exactly why the component is locking things up?

Steve [The sane]: Delphi a feersum engin indeed.
 
I have now tired to capture EndSession and QueryEndSession.

Both of them can be captured, and through that I can shut my application down.

Too late it seems. Windows has given up on shutting down.

There is something strange going on here. My EndSession seems to run before my Query handler.

But if the NMUDP component somehow captures one of the messages too and returns FALSE, Windows will quit downing!

Not much help on this component, I am afraid :-(
No source and no internal help.
 
Well, somehow the NMUDP component captures the EndSession message and returns false.

If my own handler returns true, it works!
 
Oops. Sorry.

It is my QueryEndSession handler I have left ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top