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.

* 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:


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