Error for Delphi 2009 and no english computers
Closed this issue · 1 comments
the function m_AmericanFormat := TFormatSettings.Create(lcid); is not avaible for COMPILER_12_UP but for COMPILER_14_UP
and Windows.LOCALE_NEUTRAL doesn't work on no english computers
replace Windows.LOCALE_NEUTRAL with MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)
Hi Damien, first of all, thanxs for sharing your findings!
In the code there is nothing similar with "TFormatSettings.Create(lcid)", just have a look in the browser to the unit code and search for "Create(lcid)", it is not in there. So I don't know who added this to the code you are using, but it is not in my source.
About Windows.LOCALE_NEUTRAL not working on non-english windows, I can't tell, I use this unit only from Delphi7 and this LOCALE_NEUTRAL is used only on Delphi8 and up. Googling for it didn't cleared it for me (if you know that for sure, please post a link about it), but this is just a constant declared on your windows.pas unit with a value o zero ("The value of LOCALE_NEUTRAL is 0x0000." from msdn) so you can try using a 0 instead or inspect your windows.pas unit and tell me about your findings (along with the delphi version).