Marc from D
April 9th, 2003, 03:03 AM
Hello!
I want to use a Pointer-to-Function to switch between different functions inside our own proprietary operating system.
What I want to archieve is, that without any change my code, my code is able to check whether a function with a known name exists or not.
Do you have any idea how to manage this in plain C?
Thanks!
Example:
I think about something like:
a()
{
//do something
}
main()
{
..
void (*PtF) (void);
if (exist(function a))
{
PtF = a;
PtF();
}
..
}
I want to use a Pointer-to-Function to switch between different functions inside our own proprietary operating system.
What I want to archieve is, that without any change my code, my code is able to check whether a function with a known name exists or not.
Do you have any idea how to manage this in plain C?
Thanks!
Example:
I think about something like:
a()
{
//do something
}
main()
{
..
void (*PtF) (void);
if (exist(function a))
{
PtF = a;
PtF();
}
..
}