Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5a11999b
Commit
5a11999b
authored
Jan 14, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Jan 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang: Implement Rfc1766ToLcidW.
parent
ed5b2962
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
mlang.c
dlls/mlang/mlang.c
+27
-5
mlang.spec
dlls/mlang/mlang.spec
+1
-1
No files found.
dlls/mlang/mlang.c
View file @
5a11999b
...
...
@@ -46,6 +46,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mlang);
#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,28 @@ static HRESULT lcid_from_rfc1766(IEnumRfc1766 *iface, LCID *lcid, LPCWSTR rfc176
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
;
}
/******************************************************************************
* MLANG ClassFactory
*/
...
...
@@ -1868,13 +1891,12 @@ static BOOL CALLBACK enum_locales_proc(LPWSTR locale)
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 +1940,7 @@ static HRESULT WINAPI fnIMultiLanguage_EnumRfc1766(
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 +2265,7 @@ static HRESULT WINAPI fnIMultiLanguage2_EnumRfc1766(
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
(
...
...
dlls/mlang/mlang.spec
View file @
5a11999b
...
...
@@ -11,4 +11,4 @@
@ stdcall LcidToRfc1766A(long ptr long)
@ stdcall LcidToRfc1766W(long ptr long)
@ stub Rfc1766ToLcidA
@ st
ub Rfc1766ToLcidW
@ st
dcall Rfc1766ToLcidW(ptr wstr)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment