comp.unix.programmer
Get address of function by name at runtime?
Can something like this be done in Solaris or Linux? i.e. Find the
address of a function from a string variable and call it dynamically at
run time?
void main(void)
{
char *s="FindData";
void (*fPointer) (void);
/* Get address of desired function */
fPointer=SomehowGetAddressOfFunctionFromString(s);
/* Call Function */
fPointer();
}
void FindData(void)
{
printf("It worked\n");
}
Written by Martin Crouch
15/10/2011 14.51.13
Check some pics on this site!
23/05/2012 22.27.12