login about faq

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.

asked Aug 12 '13 at 12:00

Pabra's gravatar image

Pabra
6112


link

answered Aug 12 '13 at 15:28

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Thanks! I found and fixed the problem. What new builds do you need? (VC++ versions?, Borland C++?, ec.)

link

answered Aug 12 '13 at 13:13

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

I use RAD2010, the XE2 C++ build works pretty well for me. Thanks for your quick reply

link

answered Aug 12 '13 at 15:14

Pabra's gravatar image

Pabra
6112

Works, thank you.

link

answered Aug 13 '13 at 02:30

Pabra's gravatar image

Pabra
6112

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×201

Asked: Aug 12 '13 at 12:00

Seen: 927 times

Last updated: Aug 13 '13 at 02:30

powered by OSQA