Shutdown windows (3.1 / 3.11 / 95) 
Author Message
 Shutdown windows (3.1 / 3.11 / 95)

Hi,
        Is there any way of getting VB4 to shutdown windows properly.
currently I can reboot the computer or restart windows using the WINAPI
ExitWindows (or something like that, I can't remember off the top of my
head) but I'm looking for something that will allow me to exit windows 3.1
/ 3.11 to DOS, and shutdown windows 95 to the "turn off" prompt.

        If anyone can assist e-mail responses would be appreciated, but replies to
this post might be better if other's are seeking the same information.

        Thanks in advance

John.
--
Brave and Bold Sir John the Valiant
========== a.k.a  John Syer ==========

http://www.*-*-*.com/ ~jsyer
----------------------------------------------------------------------------

Life is like a Hotdog... It tastes good only if you don't look at the
weiner



Wed, 26 Jul 2000 03:00:00 GMT  
 Shutdown windows (3.1 / 3.11 / 95)

Quote:
>    Is there any way of getting VB4 to shutdown windows properly.
> currently I can reboot the computer or restart windows using the WINAPI
> ExitWindows (or something like that, I can't remember off the top of my
> head) but I'm looking for something that will allow me to exit windows
3.1
> / 3.11 to DOS, and shutdown windows 95 to the "turn off" prompt.

Its all the same.  The ExitWindows API function can be used all the way
from Win 3.11 to WinNT 4.0...  You just have to use the correct constants.
(NT has security settings and a new function called
InitiateSystemShutdown).

From the Win3.1 Help on ExitWindows:

The ExitWindows function can restart Windows, terminate Windows and return
control to MS-DOS, or terminate Windows and restart the system. Windows
sends the WM_QUERYENDSESSION message to notify all applications that a
request has been made to restart or terminate Windows. If all applications
"agree" to terminate, Windows sends the WM_ENDSESSION message to all
applications before terminating.

EW_REBOOTSYSTEM Causes Windows to terminate and the system to restart.
EW_RESTARTWINDOWS       Causes Windows to restart.

see ya.

--
Jim Houghtaling

One-seventh of your life will be spent on Mondays.



Fri, 28 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Shutdown windows 3.1 / 3.11 / 95

2. Returning Windows version on 3.10, 3.11, 95 and NT

3. Stretchblt() problems using VB3.0 and windows (3.1, 3.11, win95)

4. Get Windows version 3.1 vs. 3.11

5. Listbox changes height when moved from Windows 3.11 to Windows 95

6. DDE & VB4 - Windows 3.11 vs Windows 95

7. Newbie: VB4, Windows 95 platform, Windows 3.1 target

8. Compile under Windows 3.1 different from compile under Windows 95

9. Setting Passwords on Windows 3.11 / 95 / NT

10. How to tell the difference between Windows 3.1 and 95, Please help

11. Maintain Application for Windows 3.1 and 95

12. Disabling Ctrl-Alt-Del in Windows 3.1/95

 

 
Powered by phpBB® Forum Software