Author: winesync Date: Fri Apr 4 08:26:49 2008 New Revision: 32847
URL: http://svn.reactos.org/svn/reactos?rev=32847&view=rev Log: Autosyncing with Wine HEAD
Modified: trunk/reactos/dll/win32/mlang/mlang.c trunk/reactos/dll/win32/mlang/mlang.rbuild trunk/reactos/dll/win32/mlang/mlang.spec
Modified: trunk/reactos/dll/win32/mlang/mlang.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mlang/mlang.c?rev... ============================================================================== --- trunk/reactos/dll/win32/mlang/mlang.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mlang/mlang.c [iso-8859-1] Fri Apr 4 08:26:49 2008 @@ -46,6 +46,7 @@ #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);
static DWORD MLANG_tls_index; /* to store various per thead data */
@@ -761,6 +762,38 @@ return E_FAIL; }
+HRESULT WINAPI Rfc1766ToLcidW(LCID *pLocale, LPCWSTR pszRfc1766) +{ + IEnumRfc1766 *enumrfc1766; + HRESULT hr; + + TRACE("(%p, %s)\n", pLocale, debugstr_w(pszRfc1766)); + + if (!pLocale || !pszRfc1766) + return E_INVALIDARG; + + *pLocale = 0; + + hr = EnumRfc1766_create(0, &enumrfc1766); + if (FAILED(hr)) + return hr; + + hr = lcid_from_rfc1766(enumrfc1766, pLocale, pszRfc1766); + IEnumRfc1766_Release(enumrfc1766); + + return hr; +} + +HRESULT WINAPI Rfc1766ToLcidA(LCID *lcid, LPCSTR rfc1766A) +{ + WCHAR rfc1766W[MAX_RFC1766_NAME + 1]; + + MultiByteToWideChar(CP_ACP, 0, rfc1766A, -1, rfc1766W, MAX_RFC1766_NAME); + rfc1766W[MAX_RFC1766_NAME] = 0; + + return Rfc1766ToLcidW(lcid, rfc1766W); +} + /****************************************************************************** * MLANG ClassFactory */ @@ -1868,13 +1901,12 @@ return TRUE; }
-static HRESULT EnumRfc1766_create(MLang_impl* mlang, LANGID LangId, - IEnumRfc1766 **ppEnum) +static HRESULT EnumRfc1766_create(LANGID LangId, IEnumRfc1766 **ppEnum) { EnumRfc1766_impl *rfc; struct enum_locales_data data;
- TRACE("%p, %04x, %p\n", mlang, LangId, ppEnum); + TRACE("%04x, %p\n", LangId, ppEnum);
rfc = HeapAlloc( GetProcessHeap(), 0, sizeof(EnumRfc1766_impl) ); rfc->vtbl_IEnumRfc1766 = &IEnumRfc1766_vtbl; @@ -1918,7 +1950,7 @@ ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage, iface); TRACE("%p %p\n", This, ppEnumRfc1766);
- return EnumRfc1766_create(This, 0, ppEnumRfc1766); + return EnumRfc1766_create(0, ppEnumRfc1766); }
/******************************************************************************/ @@ -2243,7 +2275,7 @@ ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage, iface); TRACE("%p %p\n", This, ppEnumRfc1766);
- return EnumRfc1766_create(This, LangId, ppEnumRfc1766); + return EnumRfc1766_create(LangId, ppEnumRfc1766); }
static HRESULT WINAPI fnIMultiLanguage2_GetRfc1766Info(
Modified: trunk/reactos/dll/win32/mlang/mlang.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mlang/mlang.rbuil... ============================================================================== --- trunk/reactos/dll/win32/mlang/mlang.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mlang/mlang.rbuild [iso-8859-1] Fri Apr 4 08:26:49 2008 @@ -1,5 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> +<group> <module name="mlang" type="win32dll" baseaddress="${BASEADDRESS_MLANG}" installbase="system32" installname="mlang.dll" allowwarnings="true"> <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="mlang.spec.def" /> @@ -8,16 +9,17 @@ <define name="__WINESRC__" /> <define name="WINVER">0x600</define> <define name="_WIN32_WINNT">0x600</define> + <file>mlang.c</file> + <file>regsvr.c</file> + <file>mlang.spec</file> <library>wine</library> <library>ole32</library> <library>user32</library> <library>gdi32</library> <library>advapi32</library> <library>kernel32</library> - <library>ntdll</library> <library>oleaut32</library> <library>uuid</library> - <file>mlang.c</file> - <file>regsvr.c</file> - <file>mlang.spec</file> + <library>ntdll</library> </module> +</group>
Modified: trunk/reactos/dll/win32/mlang/mlang.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mlang/mlang.spec?... ============================================================================== --- trunk/reactos/dll/win32/mlang/mlang.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mlang/mlang.spec [iso-8859-1] Fri Apr 4 08:26:49 2008 @@ -10,5 +10,5 @@ @ stdcall IsConvertINetStringAvailable(long long) @ stdcall LcidToRfc1766A(long ptr long) @ stdcall LcidToRfc1766W(long ptr long) -@ stub Rfc1766ToLcidA -@ stub Rfc1766ToLcidW +@ stdcall Rfc1766ToLcidA(ptr str) +@ stdcall Rfc1766ToLcidW(ptr wstr)