Re: Cannot use 'call_back' for a procedure

new topic     » goto parent     » topic index » view thread      » older message » newer message

Normally, using a function as a callback that returns 0 is OK for C code that expects a void function. Not sure why your code is behaving differently.

I made a simple wrapper, available at http://malcom.unkmar.com/lostsouls/testd.dll , that should allow you to wrap your Euphoria callback and make it appear as a true void function to the C code.

Here is the source code:

int(*void_call_back_1_func)(); 
int(*void_call_back_2_func)(); 
int(*void_call_back_3_func)(); 
int(*void_call_back_4_func)(); 
int(*void_call_back_5_func)(); 
 
void set_call_back_1(int(*f)()) 
{ 
	void_call_back_1_func = f; 
} 
 
void void_call_back_1(void) 
{ 
	void_call_back_1_func(); 
} 
 
void set_call_back_2(int(*f)()) 
{ 
	void_call_back_2_func = f; 
} 
 
void void_call_back_2(void) 
{ 
	void_call_back_2_func(); 
} 
 
void set_call_back_3(int(*f)()) 
{ 
	void_call_back_3_func = f; 
} 
 
void void_call_back_3(void) 
{ 
	void_call_back_3_func(); 
} 
 
void set_call_back_4(int(*f)()) 
{ 
	void_call_back_4_func = f; 
} 
 
void void_call_back_4(void) 
{ 
	void_call_back_4_func(); 
} 
 
void set_call_back_5(int(*f)()) 
{ 
	void_call_back_5_func = f; 
} 
 
void void_call_back_5(void) 
{ 
	void_call_back_5_func(); 
} 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu