>I use this code...
>
>* force user to logoff of network
>DECLARE INTEGER ExitWindowsEx IN Win32API INTEGER nFlags, INTEGER Reserved
>DECLARE INTEGER ExitProcess IN Win32API INTEGER nExitCode
>CLOSE ALL
>FLUSH
>=ExitWindowsEx(4,0)
>=ExitProcess(0)
>
>
>... to force a logoff. This works fine in NT, but when running on Win'98 and the user logs back onto the network, Windows Explorer opens up !!! Of course, this gives the users waaaaayyyyyyy too much access and must be stopped...
>
>But how? Is there a Win 98 version of the above code that I should use instead?
>
>TIA
It's an RTFM; the docs in the MSDN Library identify the problem, and give a solution:
Windows 95/98: Because of the design of the shell, calling ExitWindowsEx with EWX_FORCE fails to completely log off the user (the system terminates the applications and displays the Enter Windows Password dialog box, however, the user's desktop remains.) To log off the user forcibly, terminate the Explorer process before calling ExitWindowsEx with EWX_LOGOFF and EWX_FORCE.
You can use PostMessage() to shut down Explorer.
Ed