09-13-2010, 09:11 AM 
		
	
	
		I am wondering whether a macro triggered by a windows exit trigger can prevent windows from turning-off, under certain conditions. 
Thanks in advance.
	
	
	
	
Thanks in advance.
| 
					 Windows exit trigger
				 | 
| 
		
		
		09-13-2010, 09:11 AM 
		
	 
		I am wondering whether a macro triggered by a windows exit trigger can prevent windows from turning-off, under certain conditions.  Thanks in advance. 
		
		
		09-13-2010, 09:16 AM 
		
	 
		No. Read in MSDN about WM_QUERYENDSESSION message. You'll need a window that exists all the time. When it receves the message, let it return 0. Not tested. 
		
		
		09-14-2010, 07:32 PM 
		
	 
		Dear Gintaras, Thanks. I used a toolbar hooked to a procedure which it receives a WM_QUERYENDSESSION message : Function Test_TWT_Proc It works. However, I am not sure whether I should add a command in the form "ret 0" to prevent windows from shutting down. I tried it, but it failed. I would appreciate any further advice. Regards Simos 
		
		
		09-14-2010, 07:48 PM 
		
	 
		From 'Extended toolbars' topic in QM Help: Quote:If the hook procedure returns a nonzero value, the message is not further processed in the default window procedure. Some messages (see below) also are not processed in the default toolbar window procedure. To return 0 without further processing, declare the function as long (function% ...), and return 0x100000000. 
		
		
		09-14-2010, 07:55 PM 
		
	 
		Thanks, indeed.
	 | 
| 
					« Next Oldest | Next Newest »
				 |