Skip to contentSkip to conversation

error func

DISCUSSION raja 3 participants 3 messages Jul 8, 2005 – Jul 9, 2005

lore
Share & tools
lore

raja

author
#0 lore raw

hi,
I am writing a function that takes the return value of the another
function and gives the status of the function.
if
error("functionName",arguments)
here the function with Name "functionName " is to be executed with the corresponding argunents.But by knowing the function name how can i get the address if that function and how can i execute the function with the arguments.

thanking you

#1 lore raw

Hey,

how about managing a table of all functions? and iterate over that table using strcmp or so?

Markus

Quoted 16 lines · raja

hi,
I am writing a function that takes the return value of the another
function and gives the status of the function.
if
error("functionName",arguments)
here the function with Name "functionName " is to be executed with the corresponding argunents.But by knowing the function name how can i get the address if that function and how can i execute the function with the arguments.

thanking you
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to raja
Quoted 7 lines · raja

I am writing a function that takes the return value of the another
function and gives the status of the function.
if
error("functionName",arguments)
here the function with Name "functionName " is to be executed with the corresponding argunents.But by knowing the function name how can i get the address if that function

dlsym().

Quoted 1 line

and how can i execute the function with the arguments.

You can't portably make a function call where the number of arguments isn't known at compile time.

Signature · 1 line
Glynn Clements <[email protected]>