Hi Everyone,
I'd like to ask you what goes wrong in my program. Its a simple Ftp
uploading program, designed to upload just one file (a *.exe), as it does.
But if I copy the same file back to my desktop and run it I recieve error
codes like: C:\.....\test2.exe
The NTVDM-CPU recieved an invalid instruction.
CS:9fff IP:0054 OP:db ff ff db e7
The code uses StreamReader to read out the file.
Encoding::UTF8->GetBytes(obj->ReadToEnd()) puts it in a byte array and
uploads the whole lot, using the write function of the Stream class.
And yes, UseBinary is set to true.
Thanks in andvance,
Dexter
Carl Daniel [VC++ MVP] - 20 Jan 2007 17:17 GMT
> Hi Everyone,
> I'd like to ask you what goes wrong in my program. Its a simple Ftp
[quoted text clipped - 8 lines]
> uploads the whole lot, using the write function of the Stream class.
> And yes, UseBinary is set to true.
Don't use a StreamReader - just read from the stream directly. Using the
UTF-8 stream reader causes the byte stream to be interpreted as UTF-8, which
it's not.
-cd