Results 1 to 2 of 2

Thread: Shutting Down Windows NT

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 1999
    Posts
    44

    Post

    Hi out there! I am working on a program that will run at the end of the day and then shut down Windows NT when finished. I tried to use the code below to shut windows down but literly nothing happens. Does anyone have any ideas?

    Thanks,
    Lloyd


    'General Declarations
    Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
    Private Const EXIT_LOGOFF = 0
    Private Const EXIT_SHUTDOWN = 1
    Private Const EXIT_REBOOT = 2


    Public Sub ShutDown(ByVal uFlags As Long)
    Call ExitWindowsEx(uFlags, 0)

    End Sub


    Private Sub cmdRun_Click()
    Call ShutDown(1)

    End Sub

  2. #2
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    Prague, Czech Republic
    Posts
    350

    Post

    See http://www.vb-world.net/ubb/Forum1/HTML/010222.html (sending data trough Winsock - they are trying to shut down NT)

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