delphi部分代碼實作:
procedure notice();cdecl;stdcall
C++部分定義:
typedef void (*NoticeMethed)();
//設定回呼函式
DllExport int SetNotic(int winId,NoticeMethed method)
{
CBaseQuote* ptr = CQuoteMgr::GetInstance();
log(LL_ERROR,"DllExportNotice SetNotic Methed is 0x%x!\n",method);
ptr->SetNotic(winId,method);
return 0;
}
c++ SetNotic函式把method賦值給m_noticeback
C++使用m_noticeback()報錯
這是什么原因,求大神解答,謝謝
uj5u.com熱心網友回復:
從typedef void (*NoticeMethed)();來看procedure notice();應該是cdecl,不要用stdcall。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/72919.html
標籤:語言基礎/算法/系統設計
上一篇:invalid pointer operation, DELPHI 問題
下一篇:csdn論壇怎樣搜索啊?
