Results 1 to 2 of 2

Thread: How do I code my app to log off a user...(txt)

  1. #1

    Thread Starter
    Addicted Member Daniel_Christie's Avatar
    Join Date
    Jan 2000
    Location
    USA
    Posts
    245
    I need to shell into my app first preventing Explorer's shell from loading and then log off and back in with the Explorer's shell once certain conditions have been met.

    How do I code my app to log off a user without prompting the user?

    It would be nice to keep it as discreet as possible.

    This question is concerning Windows 95/98/ME and Visual Basic 5 or 6 Enterprise Editions.
    Last edited by Daniel_Christie; Apr 19th, 2001 at 01:01 PM.
    I appreciate all of your time and effort,
    Daniel Christie
    VB 5 and 6 Enterprise Editions,
    Html, Java scipt, Vb script,
    & etc...
    http://www.qwcd.com

  2. #2
    Matthew Gates
    Guest
    Use the ExitWindowsEx API function..


    Code:
    Private Declare Function ExitWindowsEx Lib "user32" _
    (ByVal uFlags As Long, ByVal dwReserved As Long) As _
    Long
    
    Const EWX_FORCE = 4
    Const EWX_LOGOFF = 0
    
    
    Private Sub Command1_Click()
        ExitWindowsEx EWX_FORCE Or EWX_LOGOFF, 0)
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width