Hello!
I have a following problem - I want to shut the system down from within my application. I'm using the following code:
[first, if Windows version is WinXP or Win2000 or Win2003 I set the necessary privilege (SE_SHUTDOWN_NAME) - this WORKS, I'm sure about this part]
and then:
unsingned long a;
ExitWindowsEx(EWX_POWEROFF+EWX_FORCEIFHUNG,a);
Everything works fine on XP, 2000 and 2003. But:
- on Windows98SE the system just logs off and waits for the user to log on,
- on Windows NT4.0 with SP5 the system RESTARTS (doesn't shut down).
Can you tell me what am I doing wrong?
Or maybe these systems just don't support the "power-off feature" as described in Builder's Help?
Thanks in advance guys for your help.
I have a following problem - I want to shut the system down from within my application. I'm using the following code:
[first, if Windows version is WinXP or Win2000 or Win2003 I set the necessary privilege (SE_SHUTDOWN_NAME) - this WORKS, I'm sure about this part]
and then:
unsingned long a;
ExitWindowsEx(EWX_POWEROFF+EWX_FORCEIFHUNG,a);
Everything works fine on XP, 2000 and 2003. But:
- on Windows98SE the system just logs off and waits for the user to log on,
- on Windows NT4.0 with SP5 the system RESTARTS (doesn't shut down).
Can you tell me what am I doing wrong?
Or maybe these systems just don't support the "power-off feature" as described in Builder's Help?
Thanks in advance guys for your help.