This sample code in VB6 demonstrates sending picture or image file from a client to server software via Winsock using TCP.
The challenges are:
(1). Maximum packet size using socket is 8191 bytes, thus if the picture/image is more than, the image will be transferred via socket in multiple packets.
(2). In VB6, I have discovered that array variable can only be passed as by reference (byRef) parameter. Since there is no way to pass an array byVal and there is no way to perform thread-concurrency on the process of winsock.GetData(), the best practice is to use 'variant' to fetch binary data which comes in multiple packets instead of using byte array.
-
Microsoft Common Dialog Control 6.0 (SP6)
-
Microsoft Windows Common Controls 5.0 (SP6)
-
Microsoft Winsock Control
Submitted On | 2009-11-11 17:42:08 |
By | brandon teoh |
Level | Intermediate |
User Rating | 4.2 (21 globes from 5 users) |
Compatibility | VB 6.0 |
Category | Coding Standards |
World | Visual Basic |
Archive File | Transfer_P21688611292009.zip |