.NET Socket vs VB6 Winsock problem! 
Author Message
 .NET Socket vs VB6 Winsock problem!

Hi,

I am using an ordinary VB6 program as a client, and a .NET application as my
Server.
They communicate through winsock/socket with no problems.

Although when sending a ZIP file from VB6 to .NET the file received at the
.NET server is different from the one sent by the VB6 application, and the
ZIP file becomes corrupt.

The funny part is, that when I send a ZIP file from the .NET server to the
VB6 client, then the ZIP is fine.

How should I send the file from VB6? I have tried to use the InputB in order
to send a byte array. But it doesn't help.

Here is the VB6 code that sends the file:

Open Source For Binary Access Read Lock Read As #FreeF
nCnt = 1
LenFile = LOF(FreeF)
Connection.SendData "FileLen=" & LenFile
Connection.SendData "FilePath=" & SaveAs

Dim B() As Byte
ReDim B(1 To LOF(FreeF))

Get #FreeF, , B()
Connection.SendBytes B

Close #FreeF

Thanks,

Michael



Tue, 05 Jul 2005 15:09:21 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. System.Net.Sockets.Socket Problem

2. Newbie confused: VB6 vs VB.Net vs VBScript vs VBA

3. Newbie confused: VB6 vs VB.Net vs VBscript vs VBA

4. VB6 Winsock Control vs. Winsock API

5. VB6 Winsock Control vs. Winsock API

6. VB6/ASP vs .NET/ASP.NET development

7. VB6 and VB .NET socket

8. how to use the system.net.sockets and system.net in VB.net

9. Trouble with System.Net.Sockets.Socket under Windows 98

10. System.Net.Sockets.Socket State

11. system.net.sockets.socket async server example

12. Detect Remote Disconnection System.Net.Sockets.Socket

 

 
Powered by phpBB® Forum Software