PDA

Click to See Complete Forum and Search --> : How can I bring up the Windows NT logon screen?


Daniel_Christie
Oct 19th, 2000, 07:59 AM
I need to bring up a Windows logon screen with only one keypress. What is the API call to bring up the Window's Logon Screen?

I appreciate any help you may have to offer,
Daniel Christie

bbosh
Oct 21st, 2000, 12:23 AM
' API Function
Private Declare Function ExitWindowsEx Lib "user32.dll" _
(ByVal uFlags As Long, ByVal dwReserved As Long) As Long

' Logoff
Sub Shutdown
Dim Retval as Long
Retval = ExitWindowsEx(0, 0) ' First 0 is logoff code
' second 0 is reserved in case future Win versions need it
'(0, 0) is logoff
'(1, 0) is shutdown
'(1 Or 5, 0) is forced shutdown (can be quicker)
'(2, 0) is Restart
If Retval = 0 then ' error occured
.
.
.
End If
End Sub


[Edited by bbosh on 10-21-2000 at 01:28 AM]