Hi all,
I have the following function that is accessed from a dll in mfc based project and works fine .
(in header file )
int __stdcall Register(int CallId,int StatusCode);
typedef int __stdcall fptr_regstate(int, int);
typedef void (*RegState)(fptr_regstate cb);

(in cpp file )
RegState m_regstate;
m_regstate = (RegState)GetProcAddress(hDLL,"onRegStateCallback");
m_regstate(Register);

and My problem is that i when i tried to use the above function in another application which is based on atl gives the error.
(in header file )
int __stdcall Register(int CallId,int StatusCode);
typedef int __stdcall fptr_regstate(int, int);
typedef void (*RegState)(fptr_regstate cb);

(in cpp file )
RegState m_regstate;
m_regstate = (RegState)GetProcAddress(hDLL,"onRegStateCallback");
m_regstate(&CAdoreDemoEventSink::Register);// this line gives the error

I am gettting the following error:
Error 3 error C2664: 'void (CAdoreDemoEventSink::fptr_regstate (__stdcall *))' : cannot convert parameter 1 from 'int (__stdcall CAdoreDemoEventSink::* )(int,int)' to 'CAdoreDemoEventSink::fptr_regstate (__stdcall *)'


can anybody help me out of this.


thanks ,
rohit