www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5680] New: wrong calling convention on wsprintfA/W

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5680

           Summary: wrong calling convention on wsprintfA/W
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody puremagic.com
        ReportedBy: johnch_atms hotmail.com



core.sys.windows.windows exports wsprintfA and wsprintfW with extern(Windows).
However, when I attempt to import the function, OPTLINK reports (for the W
version):

Symbol Undefined _wsprintfW 8

According to MSDN (see
http://msdn.microsoft.com/en-us/library/ms647550(v=vs.85).aspx), the function
should use the C calling convention.

So the definitions should use extern(C) instead of extern(Windows).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 02 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5680


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



13:15:44 PST ---
https://github.com/D-Programming-Language/druntime/commit/7d948b923b928447e44efcdd5395353e09fb6627

https://github.com/D-Programming-Language/phobos/commit/27d32fee9ddb90130b91cd5957d34427a30cc279

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 02 2011