PDA

View Full Version : How to handle argument mis-match when using QLibrary?



lni
2nd July 2010, 04:35
Hi,

I am using QLibrary to load external library (provided by user) then use QLibrary::resolve to find the function symbol.

The function symbol name is also provided by the user, and the function argument list has to agree with the specification.

However, sometime, the user library's function argument list doesn't match with the specification, in this case, how can I catch the error? Or at least how can I do "try...catch..." to prevent the program from crashing?

Thanks!