kernel32: Add LCMapStringEx implementation by calling LCMapStringW (alternative)
André Hentschel
nerv at dawncrow.de
Thu Jun 7 07:15:04 CDT 2012
This way we implement the Ex function by calling the W function. (Could be considered wrong)
---
dlls/kernel32/kernel32.spec | 1 +
dlls/kernel32/locale.c | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index bad71a9..0e20e33 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -806,6 +806,7 @@
@ stdcall LCIDToLocaleName(long ptr long long)
@ stdcall LCMapStringA(long long str long ptr long)
@ stdcall LCMapStringW(long long wstr long ptr long)
+@ stdcall LCMapStringEx(wstr long wstr long ptr long ptr ptr long)
@ stdcall LZClose(long)
# @ stub LZCloseFile
@ stdcall LZCopy(long long)
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c
index 2970856..f5ecbda 100644
--- a/dlls/kernel32/locale.c
+++ b/dlls/kernel32/locale.c
@@ -2714,6 +2714,42 @@ map_string_exit:
}
/*************************************************************************
+ * LCMapStringEx (KERNEL32.@)
+ *
+ * Map characters in a locale sensitive string.
+ *
+ * PARAMS
+ * name [I] 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.
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list