• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cannot make ToBinary Method fill buffer value

Participant ,
Aug 31, 2018 Aug 31, 2018

Copy link to clipboard

Copied

Cannot make buffer filled, it is filled with "CD". There is no error returned from ToBinary. Everything passes without error. Other types (StringType, UnicodeStringType...) works without problem.

//...

if (type == BinaryType) {

    size_t size;

    sAIEntry->AddRef(entry);

    sAIEntry->ToBinary(entry, NULL, &size);

    void * buffer = malloc(size);

    error = sAIEntry->ToBinary(entry, buffer, NULL);

    if (!error) {

       for (int i = 0; i < size; i++) {

           printf("%02x ", ((unsigned char *)buffer));

       }

    }

}

TOPICS
SDK

Views

502

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Sep 05, 2018 Sep 05, 2018

Have you tried:

error = sAIEntry->ToBinary(entry, buffer, &size);

Not clear from the doc if last argument can be NULL.

Votes

Translate

Translate
Adobe
Advocate ,
Sep 05, 2018 Sep 05, 2018

Copy link to clipboard

Copied

Have you tried:

error = sAIEntry->ToBinary(entry, buffer, &size);

Not clear from the doc if last argument can be NULL.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 06, 2018 Sep 06, 2018

Copy link to clipboard

Copied

LATEST

You are right, it now works. Indeed, there is no NULL mentioned for this argument in documentation, it was just my assumption. Thank You.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines