oleaut32: varformat - Force LCID_US for conversion in VarFormatNumber

Alex Villací­s Lasso a_villacis at palosanto.com
Mon Nov 6 16:04:16 CST 2006


While reviewing a tax reporting application, I found that in non-English 
locales, VarFormatNumber might fail in locales (such as Spanish) that 
use a comma as a decimal separator instead of a period. This is because 
VarFormatNumber() uses VariantChangeTypeEx(LOCALE_USER_DEFAULT) to 
produce a VT_BSTR out of whatever variant is passed in, and the output 
of this is handed to GetNumberFormatW(), which expects a number 
formatted in English locale. The use of VariantChangeTypeEx() in 
VarFormatNumber() should use LCID_US, which is what this patch does.

Changelog:
* Force LCID_US for VariantChangeTypeEx() conversion in 
VarFormatNumber() implementation.

-- 
The following cryptic message was allegedly found in the inner edge of a Windows
XP installation CD:

4F6E65204F5320746F2072756C65207468656D20616C6C2C204F6E65204F5320746F2066696E6420
7468656D2C0D0A4F6E65204F5320746F206272696E67207468656D20616C6C20616E6420696E2074
6865206461726B6E6573732062696E64207468656D2E0A

It is rumored that only a true Unix Wizard can decypher this mysterious message,
which supposedly encodes the true nature and purpose of the software.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-oleaut32-varformat-VARIANT_FormatNumber.patch
Type: text/x-patch
Size: 438 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061106/89cefd5c/wine-oleaut32-varformat-VARIANT_FormatNumber.bin


More information about the wine-patches mailing list