Results 1 to 3 of 3

Thread: Very Very Urgetn - Remote System Shut Down

  1. #1

    Thread Starter
    Hyperactive Member venkatraman_r's Avatar
    Join Date
    Jul 1999
    Location
    Chennai, INDIA
    Posts
    284

    Post

    Hi Friends,
    I have been asking this doubt for the 10th time i suppose. I got some replied but that was not sufficient for me.

    I am in an NT Environment and my computer name is W3. I need to shutdown the computer W5 from my systems i.e. from W3. This should be made possible without loading the client software on W5.

    Please someone help me out. I am in the dead end of my project without this.

    Thanx in advance..
    Venkat.


  2. #2
    New Member
    Join Date
    Nov 1999
    Posts
    10

    Post

    try the InitiateSystemShutdown API call:

    BOOL InitiateSystemShutdown(
    LPTSTR lpMachineName, // pointer to name of computer to shut down
    LPTSTR lpMessage, // pointer to message to display in
    // dialog box
    DWORD dwTimeout, // time to display dialog box
    BOOL bForceAppsClosed, // force applications closed flag
    BOOL bRebootAfterShutdown // reboot flag
    );


    Get the definition from the API text viewer.
    There is more detailed documentation in the MSDN.

    Matt

  3. #3
    Hyperactive Member
    Join Date
    Jul 1999
    Location
    NY, USA
    Posts
    270

    Post

    Or, in Visual Basic the API call is:

    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


    ------------------
    Tom Young, 14 Year Old
    [email protected]
    ICQ: 15743470 Add Me ICQ Me
    AIM: TomY10
    PERL, JavaScript and VB Programmer

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