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
20eabdf4
Commit
20eabdf4
authored
Nov 16, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Use TYPELIB resource type for all typelibs.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f0f985b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
tmarshal.rc
dlls/oleaut32/tests/tmarshal.rc
+1
-1
typelib.c
dlls/oleaut32/tests/typelib.c
+12
-12
No files found.
dlls/oleaut32/tests/tmarshal.rc
View file @
20eabdf4
...
...
@@ -37,4 +37,4 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
3 TYPELIB test_reg.tlb
/* @makedep: test_simple.tlb */
4 T
L
test_simple.tlb
4 T
YPELIB
test_simple.tlb
dlls/oleaut32/tests/typelib.c
View file @
20eabdf4
...
...
@@ -768,7 +768,7 @@ static void test_CreateDispTypeInfo(void)
SysFreeString
(
methdata
[
3
].
szName
);
}
static
void
write_typelib
(
int
res_no
,
const
WCHAR
*
filename
,
const
WCHAR
*
type
)
static
void
write_typelib
(
int
res_no
,
const
WCHAR
*
filename
)
{
DWORD
written
;
HANDLE
file
;
...
...
@@ -778,8 +778,8 @@ static void write_typelib(int res_no, const WCHAR *filename, const WCHAR *type)
file
=
CreateFileW
(
filename
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
0
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"file creation failed
\n
"
);
if
(
file
==
INVALID_HANDLE_VALUE
)
return
;
res
=
FindResourceW
(
GetModuleHandleA
(
NULL
),
(
const
WCHAR
*
)
MAKEINTRESOURCE
(
res_no
),
type
);
ok
(
res
!=
0
,
"couldn't find
resource %d %s
\n
"
,
res_no
,
debugstr_w
(
type
)
);
res
=
FindResourceW
(
GetModuleHandleA
(
NULL
),
(
const
WCHAR
*
)
MAKEINTRESOURCE
(
res_no
),
L"TYPELIB"
);
ok
(
res
!=
0
,
"couldn't find
typelib resource %d
\n
"
,
res_no
);
ptr
=
LockResource
(
LoadResource
(
GetModuleHandleA
(
NULL
),
res
));
WriteFile
(
file
,
ptr
,
SizeofResource
(
GetModuleHandleA
(
NULL
),
res
),
&
written
,
NULL
);
ok
(
written
==
SizeofResource
(
GetModuleHandleA
(
NULL
),
res
),
"couldn't write resource
\n
"
);
...
...
@@ -813,12 +813,12 @@ static void test_invoke_func(ITypeInfo *typeinfo)
ok
(
hres
==
DISP_E_BADPARAMCOUNT
,
"got 0x%08x
\n
"
,
hres
);
}
static
WCHAR
*
create_test_typelib
(
int
res_no
,
const
WCHAR
*
type
)
static
WCHAR
*
create_test_typelib
(
int
res_no
)
{
static
WCHAR
filename
[
MAX_PATH
];
GetTempFileNameW
(
L"."
,
L"tlb"
,
0
,
filename
);
write_typelib
(
res_no
,
filename
,
type
);
write_typelib
(
res_no
,
filename
);
return
filename
;
}
...
...
@@ -1025,7 +1025,7 @@ static void test_TypeInfo(void)
ITypeInfo_Release
(
pTypeInfo
);
ITypeLib_Release
(
pTypeLib
);
filename
=
create_test_typelib
(
3
,
L"TYPELIB"
);
filename
=
create_test_typelib
(
3
);
hr
=
LoadTypeLib
(
filename
,
&
pTypeLib
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -6702,7 +6702,7 @@ static void test_register_typelib(BOOL system_registration)
if
(
pIsWow64Process
)
pIsWow64Process
(
GetCurrentProcess
(),
&
is_wow64
);
filename
=
create_test_typelib
(
3
,
L"TYPELIB"
);
filename
=
create_test_typelib
(
3
);
hr
=
LoadTypeLibEx
(
filename
,
REGKIND_NONE
,
&
typelib
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
...
...
@@ -7665,8 +7665,8 @@ static void test_LoadRegTypeLib(void)
DeleteFileA
(
"main.manifest"
);
/* create typelib file */
write_typelib
(
1
,
L"test_actctx_tlb.tlb"
,
L"TYPELIB"
);
write_typelib
(
3
,
L"test_actctx_tlb2.tlb"
,
L"TYPELIB"
);
write_typelib
(
1
,
L"test_actctx_tlb.tlb"
);
write_typelib
(
3
,
L"test_actctx_tlb2.tlb"
);
hr
=
LoadRegTypeLib
(
&
LIBID_TestTypelib
,
1
,
0
,
LOCALE_NEUTRAL
,
&
tl
);
ok
(
hr
==
TYPE_E_LIBNOTREGISTERED
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -8266,7 +8266,7 @@ static void test_dep(void) {
trace
(
"Starting typelib dependency tests
\n
"
);
refFilename
=
create_test_typelib
(
4
,
L"TL"
);
refFilename
=
create_test_typelib
(
4
);
hr
=
LoadTypeLibEx
(
refFilename
,
REGKIND_NONE
,
&
preftLib
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
...
...
@@ -8345,7 +8345,7 @@ static void test_dep(void) {
hr
=
ITypeInfo_GetRefTypeInfo
(
ptInfo
,
refType
,
&
ptInfoExt
);
ok
(
hr
==
TYPE_E_CANTLOADLIBRARY
,
"got: %x
\n
"
,
hr
);
refFilename
=
create_test_typelib
(
4
,
L"TL"
);
refFilename
=
create_test_typelib
(
4
);
hr
=
LoadTypeLibEx
(
refFilename
,
REGKIND_NONE
,
&
preftLib
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
...
...
@@ -8561,7 +8561,7 @@ START_TEST(typelib)
test_SetDocString
();
test_FindName
();
if
((
filename
=
create_test_typelib
(
2
,
L"TYPELIB"
)))
if
((
filename
=
create_test_typelib
(
2
)))
{
test_dump_typelib
(
filename
);
DeleteFileW
(
filename
);
...
...
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