login about faq

I want to transfer files (applications and pictures) using sockets. I'm using visualfoxpro and I'm really at my first steps with sockets. I tried to get the file content with filetostring function and the send it with oSocket.sendstring() but what I received is not what I send. How can I get throught that ?

Thank you Alessio

This question is marked "community wiki".

asked Apr 10 '17 at 17:36

Alessio's gravatar image


To avoid problems with binary files. I frequently convert files to base64 or HexBinary with StrConvert(lcString, 13) and at the other end bring it back with StrConvert(lcString, 14).

base64 is 13 and back with 14
hexBinary is 15 and back to 16

Hope that helps. Tracy


answered Apr 10 '17 at 18:13

TracyP's gravatar image


Thank you Tracy it was exactly as you said :)


answered Apr 10 '17 at 18:48

Alessio's gravatar image



answered Apr 10 '17 at 18:53

chilkat's gravatar image

chilkat ♦♦

One good thing about the linked example is that the data stays entirely in native code (in the Chilkat C++ implementation) and doesn't need to waste time marshaling across the COM boundary to get to FoxPro..

(Apr 10 '17 at 18:56) chilkat ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Apr 10 '17 at 17:36

Seen: 1,057 times

Last updated: Apr 10 '17 at 18:56

powered by OSQA