Results 1 to 2 of 2

Thread: Network Help....?

  1. #1

    Thread Starter
    Lively Member pegasus's Avatar
    Join Date
    Nov 1999
    Location
    Birmingham, United Kingdom
    Posts
    88

    Lightbulb Network Help....?

    for a computer to connect you need a Client and Server
    one to .Connect and one to .Listen at a specified port...

    but how do u connect to a comnputer on a nterwork without giving it a copy of the program
    ie to force itto do something

    for example.. if i was a Supervisor and i wanted to shutdown all the computers on my network without loading the program on the Server... how would i go about doing this?

    thanx if u can help...

    pegasus

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    There's a program in the Windows NT or 2000 Resource Kit that does what you want to. I looked at it with dependency walker, it calls InitiateSystemShutdownA from ADVAPI32.DLL. Here's a VB declation:
    VB Code:
    1. Declare Function InitiateSystemShutdown Lib "advapi32.dll" Alias "InitiateSystemShutdownA" (ByVal lpMachineName As String, ByVal lpMessage As String, ByVal dwTimeout As Long, ByVal bForceAppsClosed As Long, ByVal bRebootAfterShutdown As Long) As Long

    You will have to use the appropriate API calls to request security for you thread to use this, and it will only work if someone with Network Admin rights is running your app.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

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