>Hi!
>
>Have you ever used ExitWindowsEx function in Win32API?
>This function has 2 parameters. One is the type of shutdown and the other is just ignored. (see Win32API help.)
>When I used this function in my form and I put 1 parameter(first one), error occurred : 'Too many argument'
>So I put no parameter and just called the function, then no error occurred and logged the user off.
>What I want is shut down the system.
>
DECLARE INTEGER ExitWindowsEx IN WIN32API INTEGER uFlags, INTEGER Reserved
=ExitWindowsEx(5,0)
This is likely not to succeed with NT and Win2K; the process must have the SE_SHUTDOWN_NAME privilege, which is not set by default.