How can I send binary data in Visual Fox Pro?
Foxpro automatically converts strings to byte arrays (UTF8) when marshalling data between the application and an OLE server. This also occurs when using the DataToSendB property of IPWorks. IPWorks expects the data as a Byte Array UTF1. In Foxpro this is done as follows:
cString = chr(0)+chr(0)+chr(4)+chr(183)
oIPWorks.DataToSendB = ConvertBinary(cString)
The ConvertBinary() function converts the string to a UTF1 ByteArray.
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at kb@nsoftware.com.