|
-
Sep 27th, 2001, 07:12 AM
#1
Thread Starter
New Member
Transfer of files through Modem.
I want to transfer files from one office to another office by using modem but not through Internet.What I really want to say that I want to Implement the functionality of PC-Anywhere Program where connection is made through dailing the Phone number through modem.I have tried through winsock control.I have tried with following code but I could not get the success.I have
no idea of how to get connected to remote machine through modem by dailing phone number.If anybody can tell me that where I am going wrong it would be highly appriciated.Any suggestion in this regard would is expected.hoping to get your possitive response in this regard.
-------------------Client side Code--------------------------------------------
Private Sub Form_Load()
Winsock1.Protocol = sckTCPProtocol
Winsock1.Connect "192.168.0.2", 1001
End Sub
Private Sub CmdSend_Click()
SendFile "C:\123.mdb", Winsock1
End Sub
------------------server side code---------------------------------------------
Private Sub Form_Load()
Winsock1.Protocol = sckTCPProtocol
Winsock1.LocalPort = 1001
Winsock1.Listen
Open "C:\123.mdb" For Binary As #1
End Sub
Private Sub WinS_ConnectionRequest(ByVal requestID As Long)
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.Accept requestID
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim StrData() As Byte
WinS.GetData StrData, vbString
Put #1, , StrData
End Sub
Private Sub Form_Unload(Cancel As Integer)
Close #1
End Sub
-
Sep 28th, 2001, 06:10 AM
#2
Retired VBF Adm1nistrator
Well the winsock control is not going to help more than likely because the TCP/IP connection wont be sent across the modem connection to the other modem.
What I would research/look into is the MSComm control instead.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
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
|