Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ab196129
Commit
ab196129
authored
Jun 18, 2009
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Jun 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang: Implement IMultiLanguage_GetNumberOfCodePageInfo, with test.
parent
0b533513
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
6 deletions
+42
-6
mlang.c
dlls/mlang/mlang.c
+9
-3
mlang.c
dlls/mlang/tests/mlang.c
+33
-3
No files found.
dlls/mlang/mlang.c
View file @
ab196129
...
...
@@ -2141,8 +2141,14 @@ static HRESULT WINAPI fnIMultiLanguage_GetNumberOfCodePageInfo(
IMultiLanguage
*
iface
,
UINT
*
pcCodePage
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
MLang_impl
*
This
=
impl_from_IMultiLanguage
(
iface
);
TRACE
(
"(%p, %p)
\n
"
,
This
,
pcCodePage
);
if
(
!
pcCodePage
)
return
E_INVALIDARG
;
*
pcCodePage
=
This
->
total_cp
;
return
S_OK
;
}
static
HRESULT
WINAPI
fnIMultiLanguage_GetCodePageInfo
(
...
...
@@ -2640,7 +2646,7 @@ static HRESULT WINAPI fnIMultiLanguage2_GetNumberOfCodePageInfo(
TRACE
(
"%p, %p
\n
"
,
This
,
pcCodePage
);
if
(
!
pcCodePage
)
return
S_FALSE
;
if
(
!
pcCodePage
)
return
E_INVALIDARG
;
*
pcCodePage
=
This
->
total_cp
;
return
S_OK
;
...
...
dlls/mlang/tests/mlang.c
View file @
ab196129
...
...
@@ -1158,6 +1158,20 @@ static void test_Rfc1766ToLcid(void)
}
static
void
test_GetNumberOfCodePageInfo
(
IMultiLanguage2
*
iML2
)
{
HRESULT
hr
;
UINT
value
;
value
=
0xdeadbeef
;
hr
=
IMultiLanguage2_GetNumberOfCodePageInfo
(
iML2
,
&
value
);
ok
(
(
hr
==
S_OK
)
&&
value
,
"got 0x%x with %d (expected S_OK with '!= 0')
\n
"
,
hr
,
value
);
hr
=
IMultiLanguage2_GetNumberOfCodePageInfo
(
iML2
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%x (expected E_INVALIDARG)
\n
"
,
hr
);
}
static
void
test_GetRfc1766FromLcid
(
IMultiLanguage2
*
iML2
)
{
...
...
@@ -1858,6 +1872,7 @@ static void test_GetScriptFontInfo(IMLangFontLink2 *font_link)
START_TEST
(
mlang
)
{
IMultiLanguage
*
iML
=
NULL
;
IMultiLanguage2
*
iML2
=
NULL
;
IMLangFontLink
*
iMLFL
=
NULL
;
IMLangFontLink2
*
iMLFL2
=
NULL
;
...
...
@@ -1870,6 +1885,21 @@ START_TEST(mlang)
test_Rfc1766ToLcid
();
test_LcidToRfc1766
();
test_ConvertINetUnicodeToMultiByte
();
test_JapaneseConversion
();
trace
(
"IMultiLanguage
\n
"
);
ret
=
CoCreateInstance
(
&
CLSID_CMultiLanguage
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMultiLanguage
,
(
void
**
)
&
iML
);
if
(
ret
!=
S_OK
||
!
iML
)
return
;
test_GetNumberOfCodePageInfo
((
IMultiLanguage2
*
)
iML
);
IMultiLanguage_Release
(
iML
);
/* IMultiLanguage2 (IE5.0 and above) */
trace
(
"IMultiLanguage2
\n
"
);
ret
=
CoCreateInstance
(
&
CLSID_CMultiLanguage
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMultiLanguage2
,
(
void
**
)
&
iML2
);
if
(
ret
!=
S_OK
||
!
iML2
)
return
;
...
...
@@ -1878,6 +1908,7 @@ START_TEST(mlang)
test_GetLcidFromRfc1766
(
iML2
);
test_GetRfc1766FromLcid
(
iML2
);
test_GetRfc1766Info
(
iML2
);
test_GetNumberOfCodePageInfo
(
iML2
);
test_EnumCodePages
(
iML2
,
0
);
test_EnumCodePages
(
iML2
,
MIMECONTF_MIME_LATEST
);
...
...
@@ -1901,10 +1932,8 @@ START_TEST(mlang)
IMultiLanguage2_Release
(
iML2
);
test_ConvertINetUnicodeToMultiByte
();
test_JapaneseConversion
();
/* IMLangFontLink */
ret
=
CoCreateInstance
(
&
CLSID_CMultiLanguage
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMLangFontLink
,
(
void
**
)
&
iMLFL
);
if
(
ret
!=
S_OK
||
!
iMLFL
)
return
;
...
...
@@ -1912,6 +1941,7 @@ START_TEST(mlang)
IMLangFontLink_Test
(
iMLFL
);
IMLangFontLink_Release
(
iMLFL
);
/* IMLangFontLink2 */
ret
=
CoCreateInstance
(
&
CLSID_CMultiLanguage
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMLangFontLink2
,
(
void
**
)
&
iMLFL2
);
if
(
ret
!=
S_OK
||
!
iMLFL2
)
return
;
...
...
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