开发者

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 signa开发者_JAVA技巧ture 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.


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 :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜