[2/2] kernel32: Add implementation for LCMapStringEx

André Hentschel nerv at dawncrow.de
Sun Apr 1 09:54:19 CDT 2012


---
 dlls/kernel32/kernel32.spec  |    1 +
 dlls/kernel32/locale.c       |   36 ++++++++++++++++++++++++++++++++++++
 dlls/kernel32/tests/locale.c |    2 +-
 3 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index b687b78..f722e96 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -803,6 +803,7 @@
 @ stdcall -i386 -private -register K32Thk1632Prolog() krnl386.exe16.K32Thk1632Prolog
 @ stdcall LCIDToLocaleName(long ptr long long)
 @ stdcall LCMapStringA(long long str long ptr long)
+@ stdcall LCMapStringEx(wstr long wstr long ptr long ptr ptr long)
 @ stdcall LCMapStringW(long long wstr long ptr long)
 @ stdcall LZClose(long)
 # @ stub LZCloseFile
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c
index 20451ff..d6a61a1 100644
--- a/dlls/kernel32/locale.c
+++ b/dlls/kernel32/locale.c
@@ -2684,6 +2684,42 @@ map_string_exit:
 }
 
 /*************************************************************************
+ *           LCMapStringEx   (KERNEL32.@)
+ *
+ * Map characters in a locale sensitive string.
+ *
+ * PARAMS
+ *  name     [I] Locale name for the conversion.
+ *  flags    [I] Flags controlling the mapping (LCMAP_ constants from "winnls.h")
+ *  src      [I] String to map
+ *  srclen   [I] Length of src in chars, or -1 if src is NUL terminated
+ *  dst      [O] Destination for mapped string
+ *  dstlen   [I] Length of dst in characters
+ *  version  [I] reserved, must be NULL
+ *  reserved [I] reserved, must be NULL
+ *  lparam   [I] reserved, must be 0
+ *
+ * RETURNS
+ *  Success: The length of the mapped string in dst, including the NUL terminator.
+ *  Failure: 0. Use GetLastError() to determine the cause.
+ */
+INT WINAPI LCMapStringEx(LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen,
+                         LPNLSVERSIONINFO version, LPVOID reserved, LPARAM lparam)
+{
+    LCID lcid;
+
+    if (version) FIXME("unsupported version structure %p\n", version);
+    if (reserved) FIXME("unsupported reserved pointer %p\n", reserved);
+    if (lparam) FIXME("unsupported lparam %lx\n", lparam);
+
+    lcid = LocaleNameToLCID(name, 0);
+    TRACE("%s(%u), %u, %s, %i, %p, %i, %p, %p, %lx\n", debugstr_w(name), lcid, flags,
+          debugstr_wn(src, srclen), srclen, dst, dstlen, version, reserved, lparam);
+
+    return LCMapStringW(lcid, flags, src, srclen, dst, dstlen);
+}
+
+/*************************************************************************
  *           FoldStringA    (KERNEL32.@)
  *
  * Map characters in a string.
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index d27666a..4bbd599 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -1655,7 +1655,7 @@ static void test_LCMapStringEx(void)
 
     if (!pLCMapStringEx)
     {
-        skip( "LCMapStringEx not available\n" );
+        win_skip( "LCMapStringEx not available\n" );
         return;
     }
 
-- 

Best Regards, André Hentschel


More information about the wine-patches mailing list