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
3bd36c84
Commit
3bd36c84
authored
Jun 25, 2009
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 25, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang: Make it possible to build the mlang test with PSDK.
parent
deeb3a9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
mlang.c
dlls/mlang/tests/mlang.c
+13
-11
No files found.
dlls/mlang/tests/mlang.c
View file @
3bd36c84
...
...
@@ -50,6 +50,9 @@ static HRESULT (WINAPI *pConvertINetMultiByteToUnicode)(LPDWORD, DWORD, LPCSTR,
LPINT
,
LPWSTR
,
LPINT
);
static
HRESULT
(
WINAPI
*
pConvertINetUnicodeToMultiByte
)(
LPDWORD
,
DWORD
,
LPCWSTR
,
LPINT
,
LPSTR
,
LPINT
);
static
HRESULT
(
WINAPI
*
pRfc1766ToLcidA
)(
LCID
*
,
LPCSTR
);
static
HRESULT
(
WINAPI
*
pLcidToRfc1766A
)(
LCID
,
LPSTR
,
INT
);
typedef
struct
lcid_tag_table
{
LPCSTR
rfc1766
;
LCID
lcid
;
...
...
@@ -239,6 +242,8 @@ static BOOL init_function_ptrs(void)
pConvertINetMultiByteToUnicode
=
(
void
*
)
GetProcAddress
(
hMlang
,
"ConvertINetMultiByteToUnicode"
);
pConvertINetUnicodeToMultiByte
=
(
void
*
)
GetProcAddress
(
hMlang
,
"ConvertINetUnicodeToMultiByte"
);
pRfc1766ToLcidA
=
(
void
*
)
GetProcAddress
(
hMlang
,
"Rfc1766ToLcidA"
);
pLcidToRfc1766A
=
(
void
*
)
GetProcAddress
(
hMlang
,
"LcidToRfc1766A"
);
pGetCPInfoExA
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32.dll"
),
"GetCPInfoExA"
);
...
...
@@ -1137,7 +1142,7 @@ static void test_Rfc1766ToLcid(void)
for
(
i
=
0
;
i
<
sizeof
(
lcid_table
)
/
sizeof
(
lcid_table
[
0
]);
i
++
)
{
lcid
=
-
1
;
ret
=
Rfc1766ToLcidA
(
&
lcid
,
lcid_table
[
i
].
rfc1766
);
ret
=
p
Rfc1766ToLcidA
(
&
lcid
,
lcid_table
[
i
].
rfc1766
);
/* IE <6.0 guess 0x412 (ko) from "kok" */
ok
(
(
ret
==
lcid_table
[
i
].
hr
)
||
...
...
@@ -1147,15 +1152,13 @@ static void test_Rfc1766ToLcid(void)
ok
(
(
lcid
==
lcid_table
[
i
].
lcid
)
||
broken
(
lcid
==
lcid_table
[
i
].
broken_lcid
),
/* IE <6.0 */
"#%02d: got LCID 0x%x (expected 0x%x)
\n
"
,
i
,
lcid
,
lcid_table
[
i
].
lcid
);
}
ret
=
Rfc1766ToLcidA
(
&
lcid
,
NULL
);
ret
=
p
Rfc1766ToLcidA
(
&
lcid
,
NULL
);
ok
(
ret
==
E_INVALIDARG
,
"got 0x%08x (expected E_INVALIDARG)
\n
"
,
ret
);
ret
=
Rfc1766ToLcidA
(
NULL
,
"en"
);
ret
=
p
Rfc1766ToLcidA
(
NULL
,
"en"
);
ok
(
ret
==
E_INVALIDARG
,
"got 0x%08x (expected E_INVALIDARG)
\n
"
,
ret
);
}
static
void
test_GetNumberOfCodePageInfo
(
IMultiLanguage2
*
iML2
)
...
...
@@ -1220,7 +1223,7 @@ static void test_LcidToRfc1766(void)
memset
(
buffer
,
'#'
,
sizeof
(
buffer
)
-
1
);
buffer
[
sizeof
(
buffer
)
-
1
]
=
'\0'
;
hr
=
LcidToRfc1766A
(
lcid_table
[
i
].
lcid
,
buffer
,
MAX_RFC1766_NAME
);
hr
=
p
LcidToRfc1766A
(
lcid_table
[
i
].
lcid
,
buffer
,
MAX_RFC1766_NAME
);
/* IE <5.0 does not recognize 0x180c (fr-mc) and 0x457 (kok) */
ok
(
(
hr
==
lcid_table
[
i
].
hr
)
||
...
...
@@ -1243,22 +1246,21 @@ static void test_LcidToRfc1766(void)
memset
(
buffer
,
'#'
,
sizeof
(
buffer
)
-
1
);
buffer
[
sizeof
(
buffer
)
-
1
]
=
'\0'
;
hr
=
LcidToRfc1766A
(
-
1
,
buffer
,
MAX_RFC1766_NAME
);
hr
=
p
LcidToRfc1766A
(
-
1
,
buffer
,
MAX_RFC1766_NAME
);
ok
(
hr
==
E_FAIL
,
"got 0x%08x and '%s' (expected E_FAIL)
\n
"
,
hr
,
buffer
);
hr
=
LcidToRfc1766A
(
LANG_ENGLISH
,
NULL
,
MAX_RFC1766_NAME
);
hr
=
p
LcidToRfc1766A
(
LANG_ENGLISH
,
NULL
,
MAX_RFC1766_NAME
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x (expected E_INVALIDARG)
\n
"
,
hr
);
memset
(
buffer
,
'#'
,
sizeof
(
buffer
)
-
1
);
buffer
[
sizeof
(
buffer
)
-
1
]
=
'\0'
;
hr
=
LcidToRfc1766A
(
LANG_ENGLISH
,
buffer
,
-
1
);
hr
=
p
LcidToRfc1766A
(
LANG_ENGLISH
,
buffer
,
-
1
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x and '%s' (expected E_INVALIDARG)
\n
"
,
hr
,
buffer
);
memset
(
buffer
,
'#'
,
sizeof
(
buffer
)
-
1
);
buffer
[
sizeof
(
buffer
)
-
1
]
=
'\0'
;
hr
=
LcidToRfc1766A
(
LANG_ENGLISH
,
buffer
,
0
);
hr
=
p
LcidToRfc1766A
(
LANG_ENGLISH
,
buffer
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x and '%s' (expected E_INVALIDARG)
\n
"
,
hr
,
buffer
);
}
static
void
test_GetRfc1766Info
(
IMultiLanguage2
*
iML2
)
...
...
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