显式调用dll的问题
隐式调用dll中的对话框没问题
但是改了一下 就出现问题了
如下:
extern "C"
bool __declspec(dllexport) CallDialog(string& conditionstr)
{
bool isok = SSManger::instance()->CallDialog(conditionstr);
return isok;
}
这里使用了一个单态模式
CallDialog(conditionstr);就是调用dlg.
在使用的时候
typedef bool (_cdecl * CallDlg)(string& str);
CallDlg callDlg = (CallDlg)GetProcAddress(inst,"CallDialog");
if(callDlg ==NULL)
MSG("call dialog not find");
else
{
MSG("call dialog find");
string str;
if(true == callDlg(str))
MSG("call dlg ok");
else
MSG("call dialog failed");
}
调试发现其中的DoMadol函数出不来
WHO KNOWS?
THANK YOU