c++ - error C2440: 'type cast' : cannot convert from 'overloaded-function' to -
i have piece of code worked fine on previous projet. part of copied working demo project , don't know how can have error on new project now. when compiling, have following error :
1>d:\visual studio 2012\netsdk_poc\mfc_netsdk2\mfc_netsdk2\netsdkfunctions.cpp(33): error c2440: 'type cast' : cannot convert 'overloaded-function' 'fdisconnect'
the code :
class cnetsdkfunctions{ void __stdcall disconnectbackcallfunc(long lloginid, char *pchdvrip, long ndvrport, dword dwuser) { cnetsdkfunctions* pthis = (cnetsdkfunctions*)dwuser; if (pthis == null) { assert( false ); return ; } //pthis->reconnect(lloginid, pchdvrip, ndvrport); } bool cnetsdkfunctions::initsdk() { long m_playerhandle; h264_dvr_getlasterror(); h264_dvr_init(null, 0); //here : bool logresult = h264_dvr_init( (fdisconnect) disconnectbackcallfunc, (dword) ); .... }
and fdisconnect definition :
typedef void (call_method *fdisconnect)(long lloginid, char *pchdvrip, long ndvrport, unsigned long dwuser);
Comments
Post a Comment