>You meant to use ExitWindowsEx(EWX_SHUTDOWN | EWX_FORCE, 0)?
>Haven't written C for quite a while. I believed I tried it.
>The desktop just flashed once and didn't shut down.
>
>Could you expand the
tag, please? I am not a member
>here so the autolink is not available.
There's no magical MSDN tag; the MSDN is a CD-based reference guide available from Microsoft. It's included with Visual Studio as a 3 CD disk set (also available as a single DVD, if you've got a DVD drive); Microsoft makes an annual subscription available, which provides quarterly updates (the base cost is around US$300; I have a Universal subscription, which runs about US$2000, which includes all of the MS Operating systems, development environments and Office products in addition to the MSDN reference system, updated on a monthly basis.)
You can access most of the MSDN information from http://msdn.microsoft.com/developer; I spend the money on the subscription, since I spend a great deal of time in the reference library, and keep it available on my system (I mount a single DVD on one of my systems with the entire reference guide and keep it online; the reference guide would use about 1.3GB of disk space downloaded to a hard drive.) The cost isn't much greater than the cost of Visual Studio Enterprise, and includes a good deal more.
>
>Thank you.
>
>>> ExitWindowsEx(EWX_SHUTDOWN, 0);
>> You'll also probably need to use both EWX_FORCE and
>> EWX_SHUTDOWN to avoid dialogs in any case.
>>
>> Under Win95, ExitWindowsEx doesn't function properly from a console
>> application. See the MSDN documentation for details.