Page 1 of 1

Posted: Sun Mar 02, 2003 10:16 pm
by BackupUser
Restored from previous forum. Originally posted by Julien Morel.

Hello :)

I will want to make a small application to stop my PC at one hour precise.
To stop the PC I use the following code:

OpenLibrary(0,"USER32.DLL")

CallFunction(0,"ExitWindowsEx",EWX_POWEROFF,0)



The problem it is that the PC does not stop but Windows closes just the session in progress.
How to make to stop the PC easily?


It would be necessary that the code goes with win9X and NT XP.
Thank you for your assistance.
Also if somebody knows how to know the number of the mother card,
it would be well.

Sorry for my English, but I french

Posted: Sun Mar 02, 2003 10:19 pm
by BackupUser
Restored from previous forum. Originally posted by fred.

EWX_POWEROFF will be 0 (variable). Use the real constant value instead (#EWX_POWEROFF = 8)

Fred - AlphaSND

Posted: Sun Mar 02, 2003 10:35 pm
by BackupUser
Restored from previous forum. Originally posted by Julien Morel.

I tested that, but that closes only the session.
OpenLibrary(0, "USER32.DLL")

CallFunction(0,"ExitWindowsEx",EWX_POWEROFF,8)



J'ai essayé ça, mais ça ferme uniquement la session :

OpenLibrary(0, "USER32.DLL")

CallFunction(0,"ExitWindowsEx",EWX_POWEROFF,8)

Posted: Sun Mar 02, 2003 11:13 pm
by BackupUser
Restored from previous forum. Originally posted by TheBeck.

See my reply to your question here:
viewtopic.php?t=5274

Posted: Wed Mar 05, 2003 12:26 am
by BackupUser
Restored from previous forum. Originally posted by Joël Roly.

Mon cher Julien.
Comme vous me l'avez demandé je vous ai envoyé les codes pour 98/Millénium/NT/2000/et XP
à votre adresse Email.
Salutation
Joël...
Programmeur amateur.