Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WINSOCK, OH WINSOCK - Transfering Files

Status
Not open for further replies.

TrueCode

MIS
Sep 30, 2003
71
LC
I am buiding a Client Server App which will require the transfer of files via a dialup remote connnection.

I have posted a number of requests for help and have received a number of them. However most of them are using TEXT transfers.

LOCAL inString as string
awinsock.object.getdata(inString)

Most of the examples has the above structure in the dataarival method.


However, I am in need of transfering non-text files like pictures and FoxPro Files.

I have really tried with little success.

------------------------------------->

"I have sought your assistance on this matter because I have exhausted all the help that I can find. You are free to direct me to other source of help"
 
Once you have established the connection, why not use ftp transfer functions? faq184-3234

If you don't want to, the GetData method supposedly supports data types other than string. As in object.GetData(buffer, datatype, maxlen). Where datatype = one of these:
Code:
   0 Uninitialized (default)
   1 Contains no valid data 
   2 Integer subtype 
   3 Long subtype 
   4 Single subtype 
   5 Double subtype 
   6 Currency subtype 
   7 Date subtype 
   8 String subtype 
   9 Object 
  10 Error subtype 
  11 Boolean subtype 
  12 Variant (used only for arrays of variants) 
  13 Data access object 
  14 Decimal subtype 
  17 Byte subtype 
8192 Array


-Dave S.-
[cheers]
Even more Fox stuff at:
 
Okay I am trying this from what Dave posted

I am planning to send a the file by chopping it using the F??? functions. Then before I send each chunk as byte, I will send a text message to tell the receiving socket that the next message being received must be patched onto an already opened low level file using FWRITE(). The text message will say whether file transfer is over, the the Low-level file will be saved to the desired name. And an size comparison will be made to ensure that the whole file was sent. The text message will be bearing the size of the file.

------------------------------------->

"I have sought your assistance on this matter because I have exhausted all the help that I can find. You are free to direct me to other source of help"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top