How do I write the following callback function?
Hi,
I am very green in Linux. That is why I posted here. The title was too short. I need to write a callback function from a shared library that will call to a function that is inside the executable. I am too green to linux, that I am not even share if Linux uses *.exe files >< Any, I will try to explain what I am trying to do here: Code:
//Executable I did the following: Code:
//Executable Furthermore, this is not my code. I am trying to add some simple functionality there. I did it on windows, and now I need to test it on Linux. But, I can't seem to get the right syntax for callback functions there. Any ideas on "Callback functions to a function that is inside an executable?" Thanx! |
Without having tried it myself recently (so not sure how helpful this is gonna be to you), but functions or normally available on the stack?, so you should be able to pass the function addresses round.
After a bit of a google I did run accross this little gem.... http://tigcc.ticalc.org/doc/gnuexts.html#SEC66 It discusses nested functions and the passing of function addresses. This is for C though. You neglected to mention which language you were using. |
Nothing special.
Main code: Code:
extern void funSlib (void); Code:
extern void funExe (void); |
All times are GMT -5. The time now is 12:13 AM. |