Register to post in forums, or Log in to your existing account
 

This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.     Home » Forums » General zApp Discussion
Nezic
Apprentice


Joined: 10 Oct 2000
Posts: 119
Location: Colorado

PostPosted: Wed Nov 24, 2004 4:49 am   

RightClick->close on task bar doesn't close right.
 
If you right-click on a zApp instance in the windows taskbar and pick 'Close', it gives you a COM Server Warning saying that if you close this manually, it may cause other clients with references to the COM objects to fail.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Nov 24, 2004 5:09 am   
 
Grrr...I really hate windows sometimes. How many ways do they need to close an application anyway? They have the File/Exit command, they have the X box in the corner of the window caption, and now they have Close in the Taskbar. The problem is that each of these methods DOES SOMETHING DIFFERENT! Windows doesn't seem to have any consistent way to close down applications. What your bug report means is that Windows is not sending the WM_CLOSE message to the application window properly and it trying to force a shutdown. This bypasses all of the normal routines that check to see if you want to save your data and which properly clean up COM objects.

I'd really try to avoid using that method to close applications since you could easily loose data, or not get your settings saved. But I'll look into it and see if I can find a way to trap that particular method of closing and clean up the COM objects. Sigh. I really hate Windows some days.
Reply with quote
Rainchild
Wizard


Joined: 10 Oct 2000
Posts: 1551
Location: Australia

PostPosted: Wed Nov 24, 2004 5:26 am   
 
I always thought that all those different close methods called PostQuitMessage( ) but obviously not... stupid windows heh.

I bet that the 'X' box sends two different messages too, one for normal 'X' and one for 'end task X'.

I think I've seen a similar COM server warning when exiting Zmud but I don't recall what sequence it was I used, I'll try and remember to post next time I see it heh.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Nov 24, 2004 10:17 pm   
 
OK, I was able to fix this. Sure enough, selecting Close from the right-click menu on the task bar forces an immediate application termination. None of the "CanClose" routines are called. So, applications that normally display a box saying "Your file has changed...save before closing?" and stuff like that are not called. This means that in many applications, using the right-click close method from the task bar will likely not save any changes you have made to files, so you can loose data doing this. Definitely not a good habit to have.

But in any case, in zApp I now trap the Terminate thread and check to see if all of the COM objects used in zApp have been cleaned up, and if not, I go ahead and do it then. This fixes the COM warning message that you were getting.

New release soon!
Reply with quote
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Home » Forums » General zApp Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2009 Zugg Software. Hosted on Wolfpaw.net