in reply to Re^7: Correct call for dll with Win32::API
in thread Correct call for dll with Win32::API

That shows that the calling convention used is __stdcall

What shows that?

  • Comment on Re^8: Correct call for dll with Win32::API

Replies are listed 'Best First'.
Re^9: Correct call for dll with Win32::API
by BrowserUk (Patriarch) on Dec 05, 2008 at 14:04 UTC

    The lack of preceding underscores on the exported names is a strong indication that the __cdecl calling convention wasn't used. It's not definitive as it could still be __fastcall, but if you follow the link to the translated PDF, you'll see that the prototypes are all similar to int WINAPI HCE300_Open (int ComPort);


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Of __stdcall, Microsoft says

      An underscore (_) is prefixed to the name. The name is followed by the at sign (@) followed by the number of bytes (in decimal) in the argument list. Therefore, the function declared as int func( int a, double b ) is decorated as follows: _func@12

        You are correct. Thankyou.

        I reversed the meaning of the underscore in my mind (and the presence of the WINAPI in the docs stopped any alarm bell from ringing).

        I've updated the post above accordingly.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.