Skip to content

HOCR_SDK_RUN_RESULT_CALLBACK

Included header

#include <HOCR_SDK_COMMON.h>

Description

Prototype of the callback used to receive engine module results asynchronously, passed as an argument to HOCR_SDK_runAsync and HOCR_SDK_runAsyncBase64

HOCR_SDK_RUN_RESULT_CALLBACK()

typedef void(*HOCR_SDK_RUN_RESULT_CALLBACK)(char*, int)

When invoked, the callback receives the result string and its length.

Parameters
NameTypeDescription
resultchar*

Engine module execution result string (JSON)

lengthint

Length of the result string

Return value

None

Examples

void resultCallbackFunc(char* resultJsonStr, int resultJsonLength) {
std::string callbackResultJson = std::string(resultJsonStr, resultJsonLength);
std::cout << callbackResultJson << std::endl;
}