[2/3] mlang: Store source and destination codepage ids in IMLangConvertCharset_Initialize

Nikolay Sivov nsivov at codeweavers.com
Mon Sep 24 03:17:06 CDT 2012


Store source and destination codepage ids in IMLangConvertCharset_Initialize

-------------- next part --------------
>From e639542751b18fc60a9d8fe04f39e43cf54a240d Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon, 24 Sep 2012 01:15:11 +0400
Subject: [PATCH 4/4] Store source and destination codepage ids in IMLangConvertCharset_Initialize

---
 dlls/mlang/mlang.c |   15 +++++++++++++--
 include/mlang.idl  |   11 +++++++++++
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c
index b5fd0eb..388b99c 100644
--- a/dlls/mlang/mlang.c
+++ b/dlls/mlang/mlang.c
@@ -3563,6 +3563,9 @@ static const IMLangLineBreakConsoleVtbl IMLangLineBreakConsole_vtbl =
 struct convert_charset {
     IMLangConvertCharset IMLangConvertCharset_iface;
     LONG ref;
+
+    UINT src_cp;
+    UINT dst_cp;
 };
 
 static inline struct convert_charset *impl_from_IMLangConvertCharset(IMLangConvertCharset *iface)
@@ -3614,8 +3617,16 @@ static HRESULT WINAPI MLangConvertCharset_Initialize(IMLangConvertCharset *iface
     UINT src_cp, UINT dst_cp, DWORD prop)
 {
     struct convert_charset *This = impl_from_IMLangConvertCharset(iface);
-    FIXME("(%p)->(%u %u 0x%08x): stub\n", This, src_cp, dst_cp, prop);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%u %u 0x%08x)\n", This, src_cp, dst_cp, prop);
+
+    if (prop)
+        FIXME("property 0x%08x not supported\n", prop);
+
+    This->src_cp = src_cp;
+    This->dst_cp = dst_cp;
+
+    return S_OK;
 }
 
 static HRESULT WINAPI MLangConvertCharset_GetSourceCodePage(IMLangConvertCharset *iface, UINT *src_cp)
diff --git a/include/mlang.idl b/include/mlang.idl
index 7cdc970..e153565 100644
--- a/include/mlang.idl
+++ b/include/mlang.idl
@@ -375,6 +375,17 @@ interface IEnumCodePage : IUnknown
 ]
 interface IMLangConvertCharset : IUnknown
 {
+    typedef enum tagMLCONVCHARF
+    {
+        MLCONVCHARF_AUTODETECT      = 1,
+        MLCONVCHARF_ENTITIZE        = 2,
+        MLCONVCHARF_NCR_ENTITIZE    = 2,
+        MLCONVCHARF_NAME_ENTITIZE   = 4,
+        MLCONVCHARF_USEDEFCHAR      = 8,
+        MLCONVCHARF_NOBESTFITCHARS  = 16,
+        MLCONVCHARF_DETECTJPN       = 32
+    } MLCONVCHAR;
+
     HRESULT Initialize(      
         [in] UINT uiSrcCodePage,
         [in] UINT uiDstCodePage,
-- 
1.5.6.5





More information about the wine-patches mailing list