开发者

Calling a function pointer with dynamic arguments

开发者 https://www.devze.com 2023-03-14 21:06 出处:网络
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开发

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

精彩评论

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