Bug 5680 – wrong calling convention on wsprintfA/W
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-03-02T02:14:00Z
Last change time
2011-03-02T13:15:44Z
Assigned to
nobody
Creator
johnch_atms
Comments
Comment #0 by johnch_atms — 2011-03-02T02:14:16Z
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).