How can I get the calling convention at runtime using type library whether using stdcall, cdecl, winapi or any other?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If a typelibrary is involved, you’re using COM. COM always uses the same calling convention (on a given OS), so it isn’t encoded into the type library. In the headers it shows up as
STDMETHOD(or something like that — I’m too lazy to check the exact spelling at the moment), but if memory serves it’s basically equivalent to__cdecl. If memory serves, there’s also an_STDMETHOD(or, again, something similar) that lets you specify a return type other thanHRESULT.