Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ExitWindowsEx always reboot but not off!
Message
De
07/02/1999 23:18:14
 
 
À
05/02/1999 20:54:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00184610
Message ID:
00184966
Vues:
26
>Hi,
> I used to do so before using the following parameter:
>#DEFINE EWX_LOGOFF 0
>#DEFINE EWX_SHUTDOWN 1
>#DEFINE EWX_REBOOT 2
>#DEFINE EWX_FORCE 4
>#DEFINE EWX_POWEROFF 8
>
>ExitWindowsEx(EWX_SHUTDOWN, 0)
>
>it do shutdown. !!!! However, if there are many running application while u issue ExitWindowsEx() it won shutdown ... (sometime) but it working last time in Win95..try it out.....!!!! if u can solve my problem please told me ...



Thanks All, It work now!

ExitWindowsEx(EWX_SHUTDOWN+EWX_FORCE, 0)

just like another API examples on Close application:

#Define WM_DESTROY 0x0002
#Define WM_CLOSE 0x0010
DECLARE INTEGER SendMessage IN Win32API;
INTEGER hwnd, INTEGER uMsg,;
INTEGER wParam, INTEGER lParam
* Close and Allow Prompt Save changes
= SendMessage(lnhwnd, WM_CLOSE, 0, 0)
* Close without allowing Prompt
= SendMessage(lnhwnd, WM_DESTROY, 0, 0)




But I would ask UT might update the knowledge on that Exit Window Passage,
as I got wrong information on usage at ExitWindowsEx() from that passage!!

Since my company has change all PC to Win95 OSR2 2.5c Version with Novell 3.12
then upgrade to Novell 4.1, I wonder it lose logout singal on shutdown PC..
So, I need to write a short program to call "Logout" backgroundly and then Shutdown the PC! Finally, all work well ^_^;

The last thing need to mention is when the written VFP prg to shutdown window
Quit at once if possible after call the ExitWindowsEx(EWX_SHUTDOWN, 0)
as I wonder the foxuser.dbf may corrupt at that time if still work sth else...
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform