|
|
|
@@ -43,8 +43,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mlang);
|
|
|
|
|
|
|
|
|
|
#define CP_UNICODE 1200
|
|
|
|
|
|
|
|
|
|
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
|
|
|
|
|
|
|
|
|
|
static HRESULT MultiLanguage_create(IUnknown *pUnkOuter, LPVOID *ppObj);
|
|
|
|
|
static HRESULT EnumRfc1766_create(LANGID LangId, IEnumRfc1766 **ppEnum);
|
|
|
|
|
|
|
|
|
@@ -450,10 +448,11 @@ static const struct mlang_data
|
|
|
|
|
const MIME_CP_INFO *mime_cp_info;
|
|
|
|
|
const char *fixed_font;
|
|
|
|
|
const char *proportional_font;
|
|
|
|
|
SCRIPT_ID sid;
|
|
|
|
|
} mlang_data[] =
|
|
|
|
|
{
|
|
|
|
|
{ "Arabic",1256,sizeof(arabic_cp)/sizeof(arabic_cp[0]),arabic_cp,
|
|
|
|
|
"Courier","Arial" }, /* FIXME */
|
|
|
|
|
"Courier","Arial", sidArabic }, /* FIXME */
|
|
|
|
|
{ "Baltic",1257,sizeof(baltic_cp)/sizeof(baltic_cp[0]),baltic_cp,
|
|
|
|
|
"Courier","Arial" }, /* FIXME */
|
|
|
|
|
{ "Chinese Simplified",936,sizeof(chinese_simplified_cp)/sizeof(chinese_simplified_cp[0]),chinese_simplified_cp,
|
|
|
|
@@ -463,23 +462,23 @@ static const struct mlang_data
|
|
|
|
|
{ "Central European",1250,sizeof(central_european_cp)/sizeof(central_european_cp[0]),central_european_cp,
|
|
|
|
|
"Courier","Arial" }, /* FIXME */
|
|
|
|
|
{ "Cyrillic",1251,sizeof(cyrillic_cp)/sizeof(cyrillic_cp[0]),cyrillic_cp,
|
|
|
|
|
"Courier","Arial" }, /* FIXME */
|
|
|
|
|
"Courier","Arial", sidCyrillic }, /* FIXME */
|
|
|
|
|
{ "Greek",1253,sizeof(greek_cp)/sizeof(greek_cp[0]),greek_cp,
|
|
|
|
|
"Courier","Arial" }, /* FIXME */
|
|
|
|
|
"Courier","Arial", sidGreek }, /* FIXME */
|
|
|
|
|
{ "Hebrew",1255,sizeof(hebrew_cp)/sizeof(hebrew_cp[0]),hebrew_cp,
|
|
|
|
|
"Courier","Arial" }, /* FIXME */
|
|
|
|
|
"Courier","Arial", sidHebrew }, /* FIXME */
|
|
|
|
|
{ "Japanese",932,sizeof(japanese_cp)/sizeof(japanese_cp[0]),japanese_cp,
|
|
|
|
|
"MS Gothic","MS PGothic" },
|
|
|
|
|
{ "Korean",949,sizeof(korean_cp)/sizeof(korean_cp[0]),korean_cp,
|
|
|
|
|
"Courier","Arial" }, /* FIXME */
|
|
|
|
|
{ "Thai",874,sizeof(thai_cp)/sizeof(thai_cp[0]),thai_cp,
|
|
|
|
|
"Courier","Arial" }, /* FIXME */
|
|
|
|
|
"Courier","Arial", sidThai }, /* FIXME */
|
|
|
|
|
{ "Turkish",1254,sizeof(turkish_cp)/sizeof(turkish_cp[0]),turkish_cp,
|
|
|
|
|
"Courier","Arial" }, /* FIXME */
|
|
|
|
|
{ "Vietnamese",1258,sizeof(vietnamese_cp)/sizeof(vietnamese_cp[0]),vietnamese_cp,
|
|
|
|
|
"Courier","Arial" }, /* FIXME */
|
|
|
|
|
{ "Western European",1252,sizeof(western_cp)/sizeof(western_cp[0]),western_cp,
|
|
|
|
|
"Courier","Arial" }, /* FIXME */
|
|
|
|
|
"Courier","Arial", sidLatin }, /* FIXME */
|
|
|
|
|
{ "Unicode",CP_UNICODE,sizeof(unicode_cp)/sizeof(unicode_cp[0]),unicode_cp,
|
|
|
|
|
"Courier","Arial" } /* FIXME */
|
|
|
|
|
};
|
|
|
|
@@ -800,22 +799,30 @@ static UINT ConvertUnknownJapaneseToUnicode(LPCSTR input, DWORD count,
|
|
|
|
|
int code = DetectJapaneseCode(input,count);
|
|
|
|
|
TRACE("Japanese code %i\n",code);
|
|
|
|
|
|
|
|
|
|
if (code == 932)
|
|
|
|
|
switch (code)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
if (output)
|
|
|
|
|
rc = MultiByteToWideChar(CP_ACP,0,input,count,output,out_count);
|
|
|
|
|
else
|
|
|
|
|
rc = MultiByteToWideChar(CP_ACP,0,input,count,0,0);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 932:
|
|
|
|
|
if (output)
|
|
|
|
|
rc = MultiByteToWideChar(932,0,input,count,output,out_count);
|
|
|
|
|
else
|
|
|
|
|
rc = MultiByteToWideChar(932,0,input,count,0,0);
|
|
|
|
|
}
|
|
|
|
|
else if (code == 51932)
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 51932:
|
|
|
|
|
if (output)
|
|
|
|
|
rc = MultiByteToWideChar(20932,0,input,count,output,out_count);
|
|
|
|
|
else
|
|
|
|
|
rc = MultiByteToWideChar(20932,0,input,count,0,0);
|
|
|
|
|
}
|
|
|
|
|
else if (code == 50220)
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 50220:
|
|
|
|
|
sjis_string = HeapAlloc(GetProcessHeap(),0,count);
|
|
|
|
|
rc = ConvertJIS2SJIS(input,count,sjis_string);
|
|
|
|
|
if (rc)
|
|
|
|
@@ -827,6 +834,7 @@ static UINT ConvertUnknownJapaneseToUnicode(LPCSTR input, DWORD count,
|
|
|
|
|
rc = MultiByteToWideChar(932,0,sjis_string,rc,0,0);
|
|
|
|
|
}
|
|
|
|
|
HeapFree(GetProcessHeap(),0,sjis_string);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return rc;
|
|
|
|
|
}
|
|
|
|
@@ -1485,12 +1493,17 @@ typedef struct tagEnumCodePage_impl
|
|
|
|
|
DWORD total, pos;
|
|
|
|
|
} EnumCodePage_impl;
|
|
|
|
|
|
|
|
|
|
static inline EnumCodePage_impl *impl_from_IEnumCodePage( IEnumCodePage *iface )
|
|
|
|
|
{
|
|
|
|
|
return (EnumCodePage_impl *)CONTAINING_RECORD( iface, EnumCodePage_impl, vtbl_IEnumCodePage );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static HRESULT WINAPI fnIEnumCodePage_QueryInterface(
|
|
|
|
|
IEnumCodePage* iface,
|
|
|
|
|
REFIID riid,
|
|
|
|
|
void** ppvObject)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumCodePage_impl, vtbl_IEnumCodePage, iface);
|
|
|
|
|
EnumCodePage_impl *This = impl_from_IEnumCodePage( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p -> %s\n", This, debugstr_guid(riid) );
|
|
|
|
|
|
|
|
|
@@ -1510,14 +1523,14 @@ static HRESULT WINAPI fnIEnumCodePage_QueryInterface(
|
|
|
|
|
static ULONG WINAPI fnIEnumCodePage_AddRef(
|
|
|
|
|
IEnumCodePage* iface)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumCodePage_impl, vtbl_IEnumCodePage, iface);
|
|
|
|
|
EnumCodePage_impl *This = impl_from_IEnumCodePage( iface );
|
|
|
|
|
return InterlockedIncrement(&This->ref);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIEnumCodePage_Release(
|
|
|
|
|
IEnumCodePage* iface)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumCodePage_impl, vtbl_IEnumCodePage, iface);
|
|
|
|
|
EnumCodePage_impl *This = impl_from_IEnumCodePage( iface );
|
|
|
|
|
ULONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
|
|
|
|
|
|
TRACE("%p ref = %d\n", This, ref);
|
|
|
|
@@ -1535,7 +1548,7 @@ static HRESULT WINAPI fnIEnumCodePage_Clone(
|
|
|
|
|
IEnumCodePage* iface,
|
|
|
|
|
IEnumCodePage** ppEnum)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumCodePage_impl, vtbl_IEnumCodePage, iface);
|
|
|
|
|
EnumCodePage_impl *This = impl_from_IEnumCodePage( iface );
|
|
|
|
|
FIXME("%p %p\n", This, ppEnum);
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
|
}
|
|
|
|
@@ -1547,8 +1560,8 @@ static HRESULT WINAPI fnIEnumCodePage_Next(
|
|
|
|
|
ULONG* pceltFetched)
|
|
|
|
|
{
|
|
|
|
|
ULONG i;
|
|
|
|
|
EnumCodePage_impl *This = impl_from_IEnumCodePage( iface );
|
|
|
|
|
|
|
|
|
|
ICOM_THIS_MULTI(EnumCodePage_impl, vtbl_IEnumCodePage, iface);
|
|
|
|
|
TRACE("%p %u %p %p\n", This, celt, rgelt, pceltFetched);
|
|
|
|
|
|
|
|
|
|
if (!pceltFetched) return S_FALSE;
|
|
|
|
@@ -1584,7 +1597,8 @@ static HRESULT WINAPI fnIEnumCodePage_Next(
|
|
|
|
|
static HRESULT WINAPI fnIEnumCodePage_Reset(
|
|
|
|
|
IEnumCodePage* iface)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumCodePage_impl, vtbl_IEnumCodePage, iface);
|
|
|
|
|
EnumCodePage_impl *This = impl_from_IEnumCodePage( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p\n", This);
|
|
|
|
|
|
|
|
|
|
This->pos = 0;
|
|
|
|
@@ -1595,7 +1609,8 @@ static HRESULT WINAPI fnIEnumCodePage_Skip(
|
|
|
|
|
IEnumCodePage* iface,
|
|
|
|
|
ULONG celt)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumCodePage_impl, vtbl_IEnumCodePage, iface);
|
|
|
|
|
EnumCodePage_impl *This = impl_from_IEnumCodePage( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p %u\n", This, celt);
|
|
|
|
|
|
|
|
|
|
if (celt >= This->total) return S_FALSE;
|
|
|
|
@@ -1671,12 +1686,17 @@ typedef struct tagEnumScript_impl
|
|
|
|
|
DWORD total, pos;
|
|
|
|
|
} EnumScript_impl;
|
|
|
|
|
|
|
|
|
|
static inline EnumScript_impl *impl_from_IEnumScript( IEnumScript *iface )
|
|
|
|
|
{
|
|
|
|
|
return (EnumScript_impl *)CONTAINING_RECORD( iface, EnumScript_impl, vtbl_IEnumScript );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static HRESULT WINAPI fnIEnumScript_QueryInterface(
|
|
|
|
|
IEnumScript* iface,
|
|
|
|
|
REFIID riid,
|
|
|
|
|
void** ppvObject)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumScript_impl, vtbl_IEnumScript, iface);
|
|
|
|
|
EnumScript_impl *This = impl_from_IEnumScript( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p -> %s\n", This, debugstr_guid(riid) );
|
|
|
|
|
|
|
|
|
@@ -1696,14 +1716,14 @@ static HRESULT WINAPI fnIEnumScript_QueryInterface(
|
|
|
|
|
static ULONG WINAPI fnIEnumScript_AddRef(
|
|
|
|
|
IEnumScript* iface)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumScript_impl, vtbl_IEnumScript, iface);
|
|
|
|
|
EnumScript_impl *This = impl_from_IEnumScript( iface );
|
|
|
|
|
return InterlockedIncrement(&This->ref);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIEnumScript_Release(
|
|
|
|
|
IEnumScript* iface)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumScript_impl, vtbl_IEnumScript, iface);
|
|
|
|
|
EnumScript_impl *This = impl_from_IEnumScript( iface );
|
|
|
|
|
ULONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
|
|
|
|
|
|
TRACE("%p ref = %d\n", This, ref);
|
|
|
|
@@ -1721,7 +1741,7 @@ static HRESULT WINAPI fnIEnumScript_Clone(
|
|
|
|
|
IEnumScript* iface,
|
|
|
|
|
IEnumScript** ppEnum)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumScript_impl, vtbl_IEnumScript, iface);
|
|
|
|
|
EnumScript_impl *This = impl_from_IEnumScript( iface );
|
|
|
|
|
FIXME("%p %p: stub!\n", This, ppEnum);
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
|
}
|
|
|
|
@@ -1732,7 +1752,8 @@ static HRESULT WINAPI fnIEnumScript_Next(
|
|
|
|
|
PSCRIPTINFO rgelt,
|
|
|
|
|
ULONG* pceltFetched)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumScript_impl, vtbl_IEnumScript, iface);
|
|
|
|
|
EnumScript_impl *This = impl_from_IEnumScript( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p %u %p %p\n", This, celt, rgelt, pceltFetched);
|
|
|
|
|
|
|
|
|
|
if (!pceltFetched || !rgelt) return E_FAIL;
|
|
|
|
@@ -1754,7 +1775,8 @@ static HRESULT WINAPI fnIEnumScript_Next(
|
|
|
|
|
static HRESULT WINAPI fnIEnumScript_Reset(
|
|
|
|
|
IEnumScript* iface)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumScript_impl, vtbl_IEnumScript, iface);
|
|
|
|
|
EnumScript_impl *This = impl_from_IEnumScript( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p\n", This);
|
|
|
|
|
|
|
|
|
|
This->pos = 0;
|
|
|
|
@@ -1765,7 +1787,8 @@ static HRESULT WINAPI fnIEnumScript_Skip(
|
|
|
|
|
IEnumScript* iface,
|
|
|
|
|
ULONG celt)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumScript_impl, vtbl_IEnumScript, iface);
|
|
|
|
|
EnumScript_impl *This = impl_from_IEnumScript( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p %u\n", This, celt);
|
|
|
|
|
|
|
|
|
|
if (celt >= This->total) return S_FALSE;
|
|
|
|
@@ -1825,26 +1848,31 @@ static HRESULT EnumScript_create( MLang_impl* mlang, DWORD dwFlags,
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
|
|
static inline MLang_impl *impl_from_IMLangFontLink( IMLangFontLink *iface )
|
|
|
|
|
{
|
|
|
|
|
return (MLang_impl *)CONTAINING_RECORD( iface, MLang_impl, vtbl_IMLangFontLink );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static HRESULT WINAPI fnIMLangFontLink_QueryInterface(
|
|
|
|
|
IMLangFontLink* iface,
|
|
|
|
|
REFIID riid,
|
|
|
|
|
void** ppvObject)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangFontLink, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMLangFontLink( iface );
|
|
|
|
|
return MLang_QueryInterface( This, riid, ppvObject );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIMLangFontLink_AddRef(
|
|
|
|
|
IMLangFontLink* iface)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangFontLink, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMLangFontLink( iface );
|
|
|
|
|
return MLang_AddRef( This );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIMLangFontLink_Release(
|
|
|
|
|
IMLangFontLink* iface)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangFontLink, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMLangFontLink( iface );
|
|
|
|
|
return MLang_Release( This );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1895,7 +1923,7 @@ static HRESULT WINAPI fnIMLangFontLink_CodePageToCodePages(
|
|
|
|
|
UINT uCodePage,
|
|
|
|
|
DWORD* pdwCodePages)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangFontLink, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMLangFontLink( iface );
|
|
|
|
|
CHARSETINFO cs;
|
|
|
|
|
BOOL rc;
|
|
|
|
|
|
|
|
|
@@ -1921,7 +1949,7 @@ static HRESULT WINAPI fnIMLangFontLink_CodePagesToCodePage(
|
|
|
|
|
UINT uDefaultCodePage,
|
|
|
|
|
UINT* puCodePage)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangFontLink, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMLangFontLink( iface );
|
|
|
|
|
DWORD mask = 0x00000000;
|
|
|
|
|
UINT i;
|
|
|
|
|
CHARSETINFO cs;
|
|
|
|
@@ -1951,7 +1979,7 @@ static HRESULT WINAPI fnIMLangFontLink_CodePagesToCodePage(
|
|
|
|
|
DWORD Csb[2];
|
|
|
|
|
Csb[0] = mask;
|
|
|
|
|
Csb[1] = 0x0;
|
|
|
|
|
rc = TranslateCharsetInfo((DWORD*)Csb, &cs, TCI_SRCFONTSIG);
|
|
|
|
|
rc = TranslateCharsetInfo(Csb, &cs, TCI_SRCFONTSIG);
|
|
|
|
|
if (!rc)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
@@ -1974,7 +2002,7 @@ static HRESULT WINAPI fnIMLangFontLink_GetFontCodePages(
|
|
|
|
|
{
|
|
|
|
|
HFONT old_font;
|
|
|
|
|
FONTSIGNATURE fontsig;
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangFontLink, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMLangFontLink( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("(%p)\n",This);
|
|
|
|
|
|
|
|
|
@@ -2032,24 +2060,29 @@ static const IMLangFontLinkVtbl IMLangFontLink_vtbl =
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
|
|
static inline MLang_impl *impl_from_IMultiLanguage( IMultiLanguage *iface )
|
|
|
|
|
{
|
|
|
|
|
return (MLang_impl *)CONTAINING_RECORD( iface, MLang_impl, vtbl_IMultiLanguage );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static HRESULT WINAPI fnIMultiLanguage_QueryInterface(
|
|
|
|
|
IMultiLanguage* iface,
|
|
|
|
|
REFIID riid,
|
|
|
|
|
void** ppvObject)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage( iface );
|
|
|
|
|
return MLang_QueryInterface( This, riid, ppvObject );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIMultiLanguage_AddRef( IMultiLanguage* iface )
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage( iface );
|
|
|
|
|
return IMLangFontLink_AddRef( ((IMLangFontLink*)This) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIMultiLanguage_Release( IMultiLanguage* iface )
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage( iface );
|
|
|
|
|
return IMLangFontLink_Release( ((IMLangFontLink*)This) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -2067,8 +2100,8 @@ static HRESULT WINAPI fnIMultiLanguage_GetCodePageInfo(
|
|
|
|
|
PMIMECPINFO pCodePageInfo)
|
|
|
|
|
{
|
|
|
|
|
UINT i, n;
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage( iface );
|
|
|
|
|
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage, iface);
|
|
|
|
|
TRACE("%p, %u, %p\n", This, uiCodePage, pCodePageInfo);
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < sizeof(mlang_data)/sizeof(mlang_data[0]); i++)
|
|
|
|
@@ -2099,7 +2132,8 @@ static HRESULT WINAPI fnIMultiLanguage_EnumCodePages(
|
|
|
|
|
DWORD grfFlags,
|
|
|
|
|
IEnumCodePage** ppEnumCodePage)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p %08x %p\n", This, grfFlags, ppEnumCodePage);
|
|
|
|
|
|
|
|
|
|
return EnumCodePage_create( This, grfFlags, 0, ppEnumCodePage );
|
|
|
|
@@ -2110,7 +2144,7 @@ static HRESULT WINAPI fnIMultiLanguage_GetCharsetInfo(
|
|
|
|
|
BSTR Charset,
|
|
|
|
|
PMIMECSETINFO pCharsetInfo)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage( iface );
|
|
|
|
|
return IMultiLanguage3_GetCharsetInfo((IMultiLanguage3*)&This->vtbl_IMultiLanguage3, Charset, pCharsetInfo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -2219,12 +2253,17 @@ typedef struct tagEnumRfc1766_impl
|
|
|
|
|
DWORD total, pos;
|
|
|
|
|
} EnumRfc1766_impl;
|
|
|
|
|
|
|
|
|
|
static inline EnumRfc1766_impl *impl_from_IEnumRfc1766( IEnumRfc1766 *iface )
|
|
|
|
|
{
|
|
|
|
|
return (EnumRfc1766_impl *)CONTAINING_RECORD( iface, EnumRfc1766_impl, vtbl_IEnumRfc1766 );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static HRESULT WINAPI fnIEnumRfc1766_QueryInterface(
|
|
|
|
|
IEnumRfc1766 *iface,
|
|
|
|
|
REFIID riid,
|
|
|
|
|
void** ppvObject)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumRfc1766_impl, vtbl_IEnumRfc1766, iface);
|
|
|
|
|
EnumRfc1766_impl *This = impl_from_IEnumRfc1766( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p -> %s\n", This, debugstr_guid(riid) );
|
|
|
|
|
|
|
|
|
@@ -2244,14 +2283,14 @@ static HRESULT WINAPI fnIEnumRfc1766_QueryInterface(
|
|
|
|
|
static ULONG WINAPI fnIEnumRfc1766_AddRef(
|
|
|
|
|
IEnumRfc1766 *iface)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumRfc1766_impl, vtbl_IEnumRfc1766, iface);
|
|
|
|
|
EnumRfc1766_impl *This = impl_from_IEnumRfc1766( iface );
|
|
|
|
|
return InterlockedIncrement(&This->ref);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIEnumRfc1766_Release(
|
|
|
|
|
IEnumRfc1766 *iface)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumRfc1766_impl, vtbl_IEnumRfc1766, iface);
|
|
|
|
|
EnumRfc1766_impl *This = impl_from_IEnumRfc1766( iface );
|
|
|
|
|
ULONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
|
|
|
|
|
|
TRACE("%p ref = %d\n", This, ref);
|
|
|
|
@@ -2268,7 +2307,8 @@ static HRESULT WINAPI fnIEnumRfc1766_Clone(
|
|
|
|
|
IEnumRfc1766 *iface,
|
|
|
|
|
IEnumRfc1766 **ppEnum)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumRfc1766_impl, vtbl_IEnumRfc1766, iface);
|
|
|
|
|
EnumRfc1766_impl *This = impl_from_IEnumRfc1766( iface );
|
|
|
|
|
|
|
|
|
|
FIXME("%p %p\n", This, ppEnum);
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
|
}
|
|
|
|
@@ -2280,8 +2320,8 @@ static HRESULT WINAPI fnIEnumRfc1766_Next(
|
|
|
|
|
ULONG *pceltFetched)
|
|
|
|
|
{
|
|
|
|
|
ULONG i;
|
|
|
|
|
EnumRfc1766_impl *This = impl_from_IEnumRfc1766( iface );
|
|
|
|
|
|
|
|
|
|
ICOM_THIS_MULTI(EnumRfc1766_impl, vtbl_IEnumRfc1766, iface);
|
|
|
|
|
TRACE("%p %u %p %p\n", This, celt, rgelt, pceltFetched);
|
|
|
|
|
|
|
|
|
|
if (!pceltFetched) return S_FALSE;
|
|
|
|
@@ -2311,7 +2351,8 @@ static HRESULT WINAPI fnIEnumRfc1766_Next(
|
|
|
|
|
static HRESULT WINAPI fnIEnumRfc1766_Reset(
|
|
|
|
|
IEnumRfc1766 *iface)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumRfc1766_impl, vtbl_IEnumRfc1766, iface);
|
|
|
|
|
EnumRfc1766_impl *This = impl_from_IEnumRfc1766( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p\n", This);
|
|
|
|
|
|
|
|
|
|
This->pos = 0;
|
|
|
|
@@ -2322,7 +2363,8 @@ static HRESULT WINAPI fnIEnumRfc1766_Skip(
|
|
|
|
|
IEnumRfc1766 *iface,
|
|
|
|
|
ULONG celt)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(EnumRfc1766_impl, vtbl_IEnumRfc1766, iface);
|
|
|
|
|
EnumRfc1766_impl *This = impl_from_IEnumRfc1766( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p %u\n", This, celt);
|
|
|
|
|
|
|
|
|
|
if (celt >= This->total) return S_FALSE;
|
|
|
|
@@ -2427,7 +2469,8 @@ static HRESULT WINAPI fnIMultiLanguage_EnumRfc1766(
|
|
|
|
|
IMultiLanguage *iface,
|
|
|
|
|
IEnumRfc1766 **ppEnumRfc1766)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p %p\n", This, ppEnumRfc1766);
|
|
|
|
|
|
|
|
|
|
return EnumRfc1766_create(0, ppEnumRfc1766);
|
|
|
|
@@ -2480,24 +2523,29 @@ static const IMultiLanguageVtbl IMultiLanguage_vtbl =
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
|
|
static inline MLang_impl *impl_from_IMultiLanguage3( IMultiLanguage3 *iface )
|
|
|
|
|
{
|
|
|
|
|
return (MLang_impl *)CONTAINING_RECORD( iface, MLang_impl, vtbl_IMultiLanguage3 );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static HRESULT WINAPI fnIMultiLanguage2_QueryInterface(
|
|
|
|
|
IMultiLanguage3* iface,
|
|
|
|
|
REFIID riid,
|
|
|
|
|
void** ppvObject)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
return MLang_QueryInterface( This, riid, ppvObject );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIMultiLanguage2_AddRef( IMultiLanguage3* iface )
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
return MLang_AddRef( This );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIMultiLanguage2_Release( IMultiLanguage3* iface )
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
return MLang_Release( This );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -2505,7 +2553,8 @@ static HRESULT WINAPI fnIMultiLanguage2_GetNumberOfCodePageInfo(
|
|
|
|
|
IMultiLanguage3* iface,
|
|
|
|
|
UINT* pcCodePage)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p, %p\n", This, pcCodePage);
|
|
|
|
|
|
|
|
|
|
if (!pcCodePage) return S_FALSE;
|
|
|
|
@@ -2559,8 +2608,8 @@ static HRESULT WINAPI fnIMultiLanguage2_GetCodePageInfo(
|
|
|
|
|
PMIMECPINFO pCodePageInfo)
|
|
|
|
|
{
|
|
|
|
|
UINT i, n;
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
|
|
|
|
|
TRACE("%p, %u, %04x, %p\n", This, uiCodePage, LangId, pCodePageInfo);
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < sizeof(mlang_data)/sizeof(mlang_data[0]); i++)
|
|
|
|
@@ -2592,7 +2641,8 @@ static HRESULT WINAPI fnIMultiLanguage2_EnumCodePages(
|
|
|
|
|
LANGID LangId,
|
|
|
|
|
IEnumCodePage** ppEnumCodePage)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p %08x %04x %p\n", This, grfFlags, LangId, ppEnumCodePage);
|
|
|
|
|
|
|
|
|
|
return EnumCodePage_create( This, grfFlags, LangId, ppEnumCodePage );
|
|
|
|
@@ -2604,8 +2654,8 @@ static HRESULT WINAPI fnIMultiLanguage2_GetCharsetInfo(
|
|
|
|
|
PMIMECSETINFO pCharsetInfo)
|
|
|
|
|
{
|
|
|
|
|
UINT i, n;
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
|
|
|
|
|
TRACE("%p %s %p\n", This, debugstr_w(Charset), pCharsetInfo);
|
|
|
|
|
|
|
|
|
|
if (!pCharsetInfo) return E_FAIL;
|
|
|
|
@@ -2752,7 +2802,8 @@ static HRESULT WINAPI fnIMultiLanguage2_EnumRfc1766(
|
|
|
|
|
LANGID LangId,
|
|
|
|
|
IEnumRfc1766** ppEnumRfc1766)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p %p\n", This, ppEnumRfc1766);
|
|
|
|
|
|
|
|
|
|
return EnumRfc1766_create(LangId, ppEnumRfc1766);
|
|
|
|
@@ -2910,8 +2961,7 @@ static HRESULT WINAPI fnIMultiLanguage2_ValidateCodePage(
|
|
|
|
|
UINT uiCodePage,
|
|
|
|
|
HWND hwnd)
|
|
|
|
|
{
|
|
|
|
|
FIXME("%u, %p\n", uiCodePage, hwnd);
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
|
return IMultiLanguage2_ValidateCodePageEx(iface,uiCodePage,hwnd,0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static HRESULT WINAPI fnIMultiLanguage2_GetCodePageDescription(
|
|
|
|
@@ -2962,7 +3012,8 @@ static HRESULT WINAPI fnIMultiLanguage2_GetNumberOfScripts(
|
|
|
|
|
IMultiLanguage3* iface,
|
|
|
|
|
UINT* pnScripts)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p %p\n", This, pnScripts);
|
|
|
|
|
|
|
|
|
|
if (!pnScripts) return S_FALSE;
|
|
|
|
@@ -2977,7 +3028,8 @@ static HRESULT WINAPI fnIMultiLanguage2_EnumScripts(
|
|
|
|
|
LANGID LangId,
|
|
|
|
|
IEnumScript** ppEnumScript)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p %08x %04x %p\n", This, dwFlags, LangId, ppEnumScript);
|
|
|
|
|
|
|
|
|
|
return EnumScript_create( This, dwFlags, LangId, ppEnumScript );
|
|
|
|
@@ -2989,8 +3041,28 @@ static HRESULT WINAPI fnIMultiLanguage2_ValidateCodePageEx(
|
|
|
|
|
HWND hwnd,
|
|
|
|
|
DWORD dwfIODControl)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
|
|
|
|
|
FIXME("%p %u %p %08x: stub!\n", This, uiCodePage, hwnd, dwfIODControl);
|
|
|
|
|
int i;
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
|
|
|
|
|
TRACE("%p %u %p %08x\n", This, uiCodePage, hwnd, dwfIODControl);
|
|
|
|
|
|
|
|
|
|
/* quick check for kernel32 supported code pages */
|
|
|
|
|
if (IsValidCodePage(uiCodePage))
|
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
|
|
/* check for mlang supported code pages */
|
|
|
|
|
for (i = 0; i < sizeof(mlang_data)/sizeof(mlang_data[0]); i++)
|
|
|
|
|
{
|
|
|
|
|
int n;
|
|
|
|
|
for (n = 0; n < mlang_data[i].number_of_cp; n++)
|
|
|
|
|
{
|
|
|
|
|
if (mlang_data[i].mime_cp_info[n].cp == uiCodePage)
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (dwfIODControl != CPIOD_PEEK)
|
|
|
|
|
FIXME("Request to install codepage language pack not handled\n");
|
|
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
|
}
|
|
|
|
@@ -3006,7 +3078,8 @@ static HRESULT WINAPI fnIMultiLanguage3_DetectOutboundCodePage(
|
|
|
|
|
UINT *pnDetectedCodePages,
|
|
|
|
|
WCHAR *lpSpecialChar)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
|
|
|
|
|
FIXME("(%p)->(%08x %s %u %p %u %p %p %p)\n", This, dwFlags, debugstr_w(lpWideCharStr),
|
|
|
|
|
cchWideChar, puiPreferredCodePages, nPreferredCodePages, puiDetectedCodePages,
|
|
|
|
|
pnDetectedCodePages, lpSpecialChar);
|
|
|
|
@@ -3023,7 +3096,8 @@ static HRESULT WINAPI fnIMultiLanguage3_DetectOutboundCodePageInIStream(
|
|
|
|
|
UINT *pnDetectedCodePages,
|
|
|
|
|
WCHAR *lpSpecialChar)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMultiLanguage3( iface );
|
|
|
|
|
|
|
|
|
|
FIXME("(%p)->(%08x %p %p %u %p %p %p)\n", This, dwFlags, pStrIn,
|
|
|
|
|
puiPreferredCodePages, nPreferredCodePages, puiDetectedCodePages,
|
|
|
|
|
pnDetectedCodePages, lpSpecialChar);
|
|
|
|
@@ -3067,24 +3141,30 @@ static const IMultiLanguage3Vtbl IMultiLanguage3_vtbl =
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
|
|
static inline MLang_impl *impl_from_IMLangFontLink2( IMLangFontLink2 *iface )
|
|
|
|
|
{
|
|
|
|
|
return (MLang_impl *)CONTAINING_RECORD( iface, MLang_impl, vtbl_IMLangFontLink2 );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static HRESULT WINAPI fnIMLangFontLink2_QueryInterface(
|
|
|
|
|
IMLangFontLink2 * iface,
|
|
|
|
|
REFIID riid,
|
|
|
|
|
void** ppvObject)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangFontLink2, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMLangFontLink2( iface );
|
|
|
|
|
return MLang_QueryInterface( This, riid, ppvObject );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIMLangFontLink2_AddRef( IMLangFontLink2* iface )
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangFontLink2, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMLangFontLink2( iface );
|
|
|
|
|
return MLang_AddRef( This );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIMLangFontLink2_Release( IMLangFontLink2* iface )
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangFontLink2, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMLangFontLink2( iface );
|
|
|
|
|
return MLang_Release( This );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -3158,8 +3238,37 @@ static HRESULT WINAPI fnIMLangFontLink2_GetScriptFontInfo(IMLangFontLink2* This,
|
|
|
|
|
SCRIPT_ID sid, DWORD dwFlags, UINT *puiFonts,
|
|
|
|
|
SCRIPTFONTINFO *pScriptFont)
|
|
|
|
|
{
|
|
|
|
|
FIXME("(%p)->%i %i %p %p\n",This, sid, dwFlags, puiFonts, pScriptFont);
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
|
UINT i, j;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p)->%u %x %p %p\n", This, sid, dwFlags, puiFonts, pScriptFont);
|
|
|
|
|
|
|
|
|
|
if (!dwFlags) dwFlags = SCRIPTCONTF_PROPORTIONAL_FONT;
|
|
|
|
|
|
|
|
|
|
for (i = 0, j = 0; i < sizeof(mlang_data)/sizeof(mlang_data[0]); i++)
|
|
|
|
|
{
|
|
|
|
|
if (sid == mlang_data[i].sid)
|
|
|
|
|
{
|
|
|
|
|
if (pScriptFont)
|
|
|
|
|
{
|
|
|
|
|
if (j >= *puiFonts) break;
|
|
|
|
|
|
|
|
|
|
pScriptFont[j].scripts = 1 << mlang_data[i].sid;
|
|
|
|
|
if (dwFlags == SCRIPTCONTF_FIXED_FONT)
|
|
|
|
|
{
|
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, mlang_data[i].fixed_font, -1,
|
|
|
|
|
pScriptFont[j].wszFont, MAX_MIMEFACE_NAME);
|
|
|
|
|
}
|
|
|
|
|
else if (dwFlags == SCRIPTCONTF_PROPORTIONAL_FONT)
|
|
|
|
|
{
|
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, mlang_data[i].proportional_font, -1,
|
|
|
|
|
pScriptFont[j].wszFont, MAX_MIMEFACE_NAME);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
j++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*puiFonts = j;
|
|
|
|
|
return S_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static HRESULT WINAPI fnIMLangFontLink2_CodePageToScriptID(IMLangFontLink2* This,
|
|
|
|
@@ -3189,26 +3298,31 @@ static const IMLangFontLink2Vtbl IMLangFontLink2_vtbl =
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
|
|
static inline MLang_impl *impl_from_IMLangLineBreakConsole( IMLangLineBreakConsole *iface )
|
|
|
|
|
{
|
|
|
|
|
return (MLang_impl *)CONTAINING_RECORD( iface, MLang_impl, vtbl_IMLangLineBreakConsole );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static HRESULT WINAPI fnIMLangLineBreakConsole_QueryInterface(
|
|
|
|
|
IMLangLineBreakConsole* iface,
|
|
|
|
|
REFIID riid,
|
|
|
|
|
void** ppvObject)
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangLineBreakConsole, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMLangLineBreakConsole( iface );
|
|
|
|
|
return MLang_QueryInterface( This, riid, ppvObject );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIMLangLineBreakConsole_AddRef(
|
|
|
|
|
IMLangLineBreakConsole* iface )
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangLineBreakConsole, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMLangLineBreakConsole( iface );
|
|
|
|
|
return MLang_AddRef( This );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static ULONG WINAPI fnIMLangLineBreakConsole_Release(
|
|
|
|
|
IMLangLineBreakConsole* iface )
|
|
|
|
|
{
|
|
|
|
|
ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangLineBreakConsole, iface);
|
|
|
|
|
MLang_impl *This = impl_from_IMLangLineBreakConsole( iface );
|
|
|
|
|
return MLang_Release( This );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -3294,7 +3408,7 @@ static HRESULT MultiLanguage_create(IUnknown *pUnkOuter, LPVOID *ppObj)
|
|
|
|
|
mlang->total_scripts = sizeof(mlang_data)/sizeof(mlang_data[0]) - 1;
|
|
|
|
|
|
|
|
|
|
mlang->ref = 1;
|
|
|
|
|
*ppObj = (LPVOID) mlang;
|
|
|
|
|
*ppObj = mlang;
|
|
|
|
|
TRACE("returning %p\n", mlang);
|
|
|
|
|
|
|
|
|
|
LockModule();
|
|
|
|
|