C++: How can I parse a function signature from a std::string into a typedef to call a function from a DLL?
I have a script engine in C++ and AngelScript, and I need to be able to call functions from DLL libraries. The problem is parsing the signature. I need to get the function signature and name from the first string parameter. How can I acquire for example from a string
“int MessageBoxW(int, wchar_t*, wchar_t*, int);”
to the original typedef for calling from C++
typedef int(MessageBoxW)(int, wchar_t, wchar_t*, int);
Then I split the string and after the first space I get the name of the function, call GetProcAddress, and call the function with parameters.