|
-
Nov 15th, 1999, 06:06 PM
#1
Thread Starter
Hyperactive Member
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.
-
Nov 16th, 1999, 07:50 AM
#2
New Member
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
-
Nov 16th, 1999, 09:59 AM
#3
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|