VB code with Window Network API
No attachments for this post
With this code your can Shutdown any Workstation connected on LAN (Local Area Network) od Windows NT/2000.
This code is very usefull for LAN applications. It will give an good idea to communicate with other worstations.
Original Author: Abid Khurshid Butt
Just Workstation Name to Shutdown
User must know something about Windows API and some knowledge of Network.
Required Workstation will Shutdown
There no side effects for this code.
Private 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
Private Sub Command1_Click()
a = InitiateSystemShutdown(Trim(Text1.Text), "Hello", 0, 0, 1)
MsgBox "Shutdown Completed"
Comments on this post
No comments have been added for this post.
You must be logged in to make a comment.