Question:
I try to use SFTP upload with embedded data, with WriteFileBytes. The byte data is extracted from a embedded ZIP.
This causes an access violation, so I tried WriteFileText, same result. The file is transferred completly.
It is always a read access violation, always the same address (depending on compiler): 0x00000028 at visual c++ 0x00000024 at borland c++
I have tried C++ and C API with Borland. For Visual C++ I only made a quick test with C:
HCkSFtp sftp; const char* handle;
sftp = CkSFtp_Create();
CkSFtp_UnlockComponent(sftp, "MY_PURCHASED_KEY");
if (CkSFtp_Connect(sftp, "192.168.56.2", 22))
{
do
{
if (!CkSFtp_AuthenticatePw(sftp, "root", "whatever"))
break;
if (!CkSFtp_InitializeSftp(sftp))
break;
handle = CkSFtp_openFile(sftp, "/root/test.txt", "writeOnly", "createTruncate");
if (handle)
{
CkSFtp_WriteFileText(sftp, handle, "ansi", "test\n"); // -> Trap!
CkSFtp_CloseHandle(sftp, handle);
}
}
while (0);
CkSFtp_Disconnect(sftp);
}
CkSFtp_Dispose(sftp);
I have downloaded the latest version (9.4.1), Server is linux with openssh, client is windows 7 64-bit, application is always 32 bit.
Here's a new build for you to test: http://www.chilkatsoft.com/preRelease/chilkat-9.4.1-bcc-xe2.zip
Thanks! I found and fixed the problem. What new builds do you need? (VC++ versions?, Borland C++?, ec.)
I use RAD2010, the XE2 C++ build works pretty well for me. Thanks for your quick reply
Works, thank you.