VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Transfer Picture from Client to Server

by brandon teoh (4 Submissions)
Category: Coding Standards
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

This sample code in VB6 demonstrates sending picture or image file from a client to server software via Winsock using TCP.

Inputs
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.
Assumes
1. Microsoft Common Dialog Control 6.0 (SP6) 2. Microsoft Windows Common Controls 5.0 (SP6) 3. Microsoft Winsock Control

Rate Transfer Picture from Client to Server

Download Transfer Picture from Client to Server

Download Transfer Picture from Client to Server (407 KB)

Transfer Picture from Client to Server Comments

No comments have been posted about Transfer Picture from Client to Server. Why not be the first to post a comment about Transfer Picture from Client to Server.

Post your comment

Subject:
Message:
0/1000 characters