On Wed, 01 Jun 2011 16:13:44 -0400, Lloyd Dupont <ld-rem...@galador.net>
wrote:
Thanks for the link hey! :)
Otherwise I still get the same linking error with the W :(
It looks like that particular function does not have the A and W versions.
See this page:
http://msdn.microsoft.com/en-us/library/dd318136%28v=vs.85%29.aspx
And see this for an example of something that comes in W and A variety:
http://msdn.microsoft.com/en-us/library/dd317759%28v=VS.85%29.aspx
Note at the bottom the "Unicode and ANSI names" part.
Here is my new theory -- note that the function is only defined on Vista
or later. DMD does not use the same object format as Windows (i.e. Visual
C++), so all libraries have to be "converted" to a form that dmd can link
with. Most of the relevant Windows lib files are already pre-converted
and included in the dmd distribution under windows/lib. I'd bet that the
version of kernel32.lib that was used to generate this file is an XP
version, which would not contain this function.
I'd recommend investigating how to replace that kernel32.lib with the
Vista (or later) version (I'm sure someone will tell you here ;) or try
using the predecessor function, which should be universally compatible
(See the above noted documentation).
-Steve
"Andrej Mitrovic" wrote in message
news:mailman.518.1306939098.14074.digitalmars-d-le...@puremagic.com...
From what I can tell you're using the wide version, so try prototyping
it as GetUserDefaultLocaleNameW <- note the W
Otherwise you should really get
http://dsource.org/projects/bindings/wiki/WindowsApi , which has
prototypes for many windows functions. You just have to build and use
it with --version=Unicode if you want GetUserDefaultLocaleName to
alias itself to GetUserDefaultLocaleNameW.