testhyc
August 6th, 2004, 07:18 AM
Hello. I have the following problem.
I am try to use c++ .net create a .net class. I want to call a callback function,and let this callback function point
to the __gc class's method,and through this method trigger the class's event
I want use following function
extern long __cdecl sr_enbhdlr(long ddd, unsigned long event_type,long (*hdlr)(unsigned long parm));
aI declare following method in __gc class
long event_handler(unsigned long param)
and I write below code to call this function
sr_enbhdlr(EV_ANYDEV, EV_ANYEVT,event_handler);
When I want compiler these code,the error message recieved is as below:
error C2664: 'sr_enbhdlr' : can't convert 'long (unsigned long)' to 'long (__cdecl *)(unsigned long)' on parameter 3
Where's the problem and how can i fix it?
Can someone help me?
Can someone help me?
I am try to use c++ .net create a .net class. I want to call a callback function,and let this callback function point
to the __gc class's method,and through this method trigger the class's event
I want use following function
extern long __cdecl sr_enbhdlr(long ddd, unsigned long event_type,long (*hdlr)(unsigned long parm));
aI declare following method in __gc class
long event_handler(unsigned long param)
and I write below code to call this function
sr_enbhdlr(EV_ANYDEV, EV_ANYEVT,event_handler);
When I want compiler these code,the error message recieved is as below:
error C2664: 'sr_enbhdlr' : can't convert 'long (unsigned long)' to 'long (__cdecl *)(unsigned long)' on parameter 3
Where's the problem and how can i fix it?
Can someone help me?
Can someone help me?