Home > Back-end >  Delphi function as a callback function using C an error
Delphi function as a callback function using C an error

Time:09-24

Delphi code implementation:
Procedure notice (); Cdecl; Stdcall

C + + part of the definition:
NoticeMethed typedef void (*) ();
//set the callback function
DllExport int SetNotic (int winId, NoticeMethed method)
{
CBaseQuote * PTR=CQuoteMgr: : GetInstance ();

The log (LL_ERROR, "DllExportNotice SetNotic Methed is 0 x % x! \ n ", method);
PTR - & gt; SetNotic (winId, method);

return 0;
}
The c + + SetNotic function method assigned to m_noticeback

C + + using m_noticeback () error

What reason is this, a great god answer, thank you

CodePudding user response:

From the typedef void NoticeMethed (*) (); See
Procedure notice (); Should be cdecl, don't use stdcall,

  • Related