Visual Basic - Encender y apagar pc's en LAN

Life is soft - evento anual de software empresarial
 
Vista:

Encender y apagar pc's en LAN

Publicado por Manuel (12 intervenciones) el 05/07/2007 18:22:58
Alguien me puede ayudar, no puedo realizar un programa de encendido y apagado en una LAN lo estoy haciendo con el WINSOCK pero me sale un error, estoy enviando por el puerto de red la direccion fisica de la computadora que voy a prender en dato hexadeciaml, por teoria del algoritmo asi es como se debe hacer, pero me sale, algun alcance gente ....
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

RE:Encender y apagar pc's en LAN

Publicado por Edwin (303 intervenciones) el 06/07/2007 22:37:36
Para encender??? no sé eh, pero para apagar un simple mensaje con el winsock, y al recibir aplicaría la API ExitWindowsEx.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Encender y apagar pc's en LAN

Publicado por Manuel (2 intervenciones) el 11/07/2007 16:03:24
HAcemos una cosa Edwin yo ya hice el programa para encerder pc's en una Lan pasame tu codigo de apagado y yo te paso el codigo de encendido me das tu correo para enviartelo por medio de un ZIP, para que lo tengas en tu repertorio y tu pasame el apagado, Vae, Nos vemos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Encender y apagar pc's en LAN

Publicado por edson valenzuela (1 intervención) el 14/07/2007 00:50:19
ESTE CODIGO ES PARA ENCENDER LA PC A TRAVEZ DE LA ATI ENVIANDOLE CODIGO BINARIO A TRAVEZ DEL BIOS, DEBES ACTIVAR REMOTE ON PC EN EL BIOS DE LA PC
SI TIENES POR AHI COMO ENCENDERLO PUES.. MANDAMELO.
ESPERO QUE ESTO TE SIRVA

Dim ret As Integer
Private Type datos
a As String * 2
b As String * 2
c As String * 2
d As String * 2
e As String * 2
f As String * 2
nombre As String * 10
End Type
Dim valores As datos
Private Sub Command1_Click()
Dim buffer() As Byte
Dim numero As Byte
ReDim buffer(101) As Byte

Dim VAR(0 To 6) As String
VAR(0) = "&h" & Text1(0)
VAR(1) = "&h" & Text1(1)
VAR(2) = "&h" & Text1(2)
VAR(3) = "&h" & Text1(3)
VAR(4) = "&h" & Text1(4)
VAR(5) = "&h" & Text1(5)

For numero = 0 To 5
buffer(numero) = &HFF
Next
For numero = 6 To 101 Step 6
buffer(numero) = VAR(0)
buffer(numero + 1) = VAR(1)
buffer(numero + 2) = VAR(2)
buffer(numero + 3) = VAR(3)
buffer(numero + 4) = VAR(4)
buffer(numero + 5) = VAR(5)
Next
Winsock1.RemoteHost = "255.255.255.255"
Winsock1.RemotePort = 54323
Winsock1.SendData buffer
End Sub


Private Sub Command2_Click()
ret = Label1
ret = ret + 1
Open "C:\base.xfg" For Random As #1 Len = Len(valores)
valores.nombre = Text2
valores.a = Text1(0)
valores.b = Text1(1)
valores.c = Text1(2)
valores.d = Text1(3)
valores.e = Text1(4)
valores.f = Text1(5)
List1.AddItem Text2
Put #1, ret, valores
Close #1
Label1 = ret
ret = 0
End Sub

Private Sub Command3_Click()
ret = List1.ListIndex + 1
Open "C:\base.xfg" For Random As #1 Len = Len(valores)
valores.nombre = Text2
valores.a = Text1(0)
valores.b = Text1(1)
valores.c = Text1(2)
valores.d = Text1(3)
valores.e = Text1(4)
valores.f = Text1(5)
Put #1, ret, valores
Close #1
Label1 = ret
End Sub

Private Sub Command4_Click()
End
End Sub

Private Sub Form_Load()
Dim W As Integer
Open "C:\base.xfg" For Random As #1 Len = Len(valores)
Label1 = LOF(1) / 22
For W = 1 To Label1
Get #1, W, valores
List1.AddItem valores.nombre
Next
Close #1
End Sub

Private Sub List1_Click()
ret = List1.ListIndex + 1
Open "C:\base.xfg" For Random As #1 Len = Len(valores)
Get #1, ret, valores
Text1(0) = valores.a
Text1(1) = valores.b
Text1(2) = valores.c
Text1(3) = valores.d
Text1(4) = valores.e
Text1(5) = valores.f
Text2 = valores.nombre
Close #1
End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 Then
Index = Index + 1
If Index > 5 Then
Command1.SetFocus
Else
Text1(Index).SetFocus
End If
End If

End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar