次の問題で立ち往生しています: エクスポートされた関数を含む DLL があります。
コード例は次のとおりです。 [DLL]
__declspec(dllexport) int openDevice(int,void**)
[アプリ]
dev.h:
__declspec(dllimport) int openDevice(int,void**)
dev.cpp:
try {
void *p = NULL;
int devError = openDevice(some_integer,&p);
if(devError)
throw (int)devError;
} catch(int i) {
cerr << "Device opening error: " << i << endl;
}
catch(...) {
//other handler
}
例外は catch ブロックに渡されません。その理由はありません。この問題を解決するのを手伝ってください。MSVC 9.0 で Qt Creator を使用しています。