"Calling Construct() twice or more on a same instance is not allowed for this class.");
std::unique_ptr<_ImageRecognizerImpl> pImageRecognizerImpl (new (std::nothrow) _ImageRecognizerImpl);
- SysTryReturn(NID_UIX, pImageRecognizerImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysSecureTryReturn(NID_UIX, pImageRecognizerImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pImageRecognizerImpl = pImageRecognizerImpl.release();
return E_SUCCESS;
{
SysAssertf(__pImageRecognizerImpl != null, "Not yet constructed! Consruct() should be called before use.");
- SysTryReturnResult(NID_UIX, width > 0 && height > 0, E_INVALID_ARG,
+ SysSecureTryReturnResult(NID_UIX, width > 0 && height > 0, E_INVALID_ARG,
"Width and height must me more than 0. [E_INVALID_ARG]");
return __pImageRecognizerImpl->SetImageSize(width, height) ? E_SUCCESS : E_FAILURE;
{
SysAssertf(__pImageRecognizerImpl != null, "Not yet constructed! Consruct() should be called before use.");
- SysTryReturn(NID_UIX, imageBuffer.GetPointer(), -1, E_INVALID_ARG,
+ SysSecureTryReturn(NID_UIX, imageBuffer.GetPointer(), -1, E_INVALID_ARG,
"imageBuffer must not be null. [E_INVALID_ARG]");
return __pImageRecognizerImpl->ProcessImage((unsigned char*) imageBuffer.GetPointer()) != -1 ? E_SUCCESS : E_FAILURE;