Puppy
Puppy

Reputation: 146930

Calling a function pointer with dynamic arguments

I've obtained a function pointer at run-time, let's say through something like GetProcAddress (so a weakly-typed void*), and then I've got this metadata that tells me what the function's signature is at run-time. How can I call the function correctly, preferably in Standard code? C++0x solution is fine, and I don't mind having to enforce my own type-safety.

Upvotes: 3

Views: 248

Answers (1)

Armen Tsirunyan
Armen Tsirunyan

Reputation: 133014

Er... no, you can't. There is no thing like reflection is C++ or C++0x, you can't get a type out of a string or whatever. Unfortunately :)

Upvotes: 1

Related Questions