I have to know exactly what happens:
Case 1) You check the return value of tak_SSD_Create_FromStream. If it is NULL, no decoder object could be created and you can't use the return value as decoder parameter in subsequent API calls!
Case 2) The return value of tak_SSD_Create_FromStream is not NULL. Nevertheless an error can have occured. You check this by calling tak_SSD_Valid.
Case 3) You are talking about exceptions raised by C.
1) The return value of "tak_SSD_Create_FromSteam" is not NULL.
2) tak_SSD_Valid told me it was an "Unknown ERROR"
3) Here is a piece of my code:
BOOL ret = FALSE;
TtakResult rst;
if ( NULL == ssd) {
MessageBoxA( NULL, "It is NULL", "ERROR", 0);
return ret;
} else {
if ( tak_True != tak_SSD_Valid( ssd)) {
char msg[tak_ErrorStringSizeMax];
tak_SSD_GetErrorString( rst, msg, tak_ErrorStringSizeMax);
strcat( msg, "\nCreate!!!");
MessageBoxA( NULL, msg, "ERROR", 0);
return ret;
}
if ( tak_res_Ok != (rst = tak_SSD_GetStreamInfo( ssd, &si))) {
char msg[tak_ErrorStringSizeMax];
tak_SSD_GetErrorString( rst, msg, tak_ErrorStringSizeMax);
strcat( msg, "\nGetStreamInfo");
MessageBoxA( NULL, msg, "ERROR", 0);
return ret;
}
}
What we are talking about is the "Release" Version. I caught the error "Unknown Error\nCreate!!!" by using MessageBox.
But there is no such error in "Debug" version, my plug-in just raised an exception directly, and popupped a system dialog asking me to do debugging.