|
-
Jun 18th, 2001, 08:02 AM
#1
Thread Starter
Lively Member
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
-
Jun 18th, 2001, 11:37 AM
#2
Black Cat
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:
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|