Hi all,
I made a prog that reboot or shutdown the system a few year(s) ago, but I would like to know how I can do under NT (WIN2K and WINXP) because I know that I can logoff the current user, but rebooting and shutdowning don't work. I know I must use permissions functions but I don't understand how it works ! (I've read win32hlp)

So thanks in advance for the help.

:I also wanted to say that this forum is great:alright: , it helps people a lot, and asm is great too.:alright: THANKS A LOT TO ALL PROGRAMMERS
Posted on 2002-01-22 16:03:08 by Vom-bonjour:-()
Salut Vom ! :alright:

What is described on this page may do the trick... (easy C code, and good comments).

I hope this helps. ;)
Posted on 2002-01-22 16:19:25 by JCP
Yeah!, thanks Readiosys, that was what I needed. I do not practise C but it doesn't look so hard, great thanks.

PS to Readiosys only: Au fait,demain et jeudi c'est les journ?es lyc?ens, je vais aller voir l'INSA, j'aimerais vraiment entrer en ?cole d'ing?. Je te dis ?a juste parce qu'on en avait parl?, mais c'est pas important.
Posted on 2002-01-22 16:28:57 by Vom-bonjour:-()
I do not practise C but it doesn't look so hard, great thanks.

It is a somewhat weird code because it is C++ Builder style (Application->... typical !)... but all the needed APIs are here. ;)
Anyway, if you have problems while converting the C code, just ask. ;)

Sinon, ? propos de l'?cole d'ing?, j'esp?re que ?a te plaira ! :p
Ils vont te faire faire du CAML l? bas, mais c'est un langage sympathique pour les "matheux", parait-il... ;)
Posted on 2002-01-22 16:36:45 by JCP

I knew there was a reason for Microsoft using mixed case with their API names, my first impression with this question was,


Instead of,


Ah M$, youv'e done it again. :tongue:


Posted on 2002-01-23 02:37:51 by hutch--
hehe :rolleyes:

I presume that Microsoft programmers don't have much fun... sometimes they can be a bit libidinous. ;)
Posted on 2002-01-23 03:17:11 by JCP
"exit_window_sex" - heh. I suspected I wasn't the only one who read it like that :rolleyes:
Posted on 2002-01-23 09:28:07 by f0dder

That wasn't as much fun as start_window_sex - the angle of the roof made it a bit scary, but she was quite insistant and I was eager. ;)
Posted on 2002-01-23 10:00:07 by bitRAKE
But do not forget first to find_window_sex. :grin:
Posted on 2002-01-23 12:31:09 by CodeLover