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
c76de898
Commit
c76de898
authored
Apr 25, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Store the test typelib in resources instead of depending on an external file.
parent
046cfcfd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
tmarshal.rc
dlls/oleaut32/tests/tmarshal.rc
+3
-0
typelib.c
dlls/oleaut32/tests/typelib.c
+29
-1
No files found.
dlls/oleaut32/tests/tmarshal.rc
View file @
c76de898
...
...
@@ -29,3 +29,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/* @makedep: tmarshal.tlb */
1 TYPELIB LOADONCALL DISCARDABLE tmarshal.tlb
/* @makedep: test_tlb.tlb */
2 TYPELIB LOADONCALL DISCARDABLE test_tlb.tlb
dlls/oleaut32/tests/typelib.c
View file @
c76de898
...
...
@@ -1337,13 +1337,41 @@ static void test_dump_typelib(const char *name)
#endif
static
const
char
*
create_test_typelib
(
void
)
{
static
char
filename
[
MAX_PATH
];
HANDLE
file
;
HRSRC
res
;
void
*
ptr
;
DWORD
written
;
GetTempFileNameA
(
"."
,
"tlb"
,
0
,
filename
);
file
=
CreateFile
(
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
NULL
;
res
=
FindResource
(
GetModuleHandle
(
0
),
MAKEINTRESOURCE
(
2
),
"TYPELIB"
);
ok
(
res
!=
0
,
"couldn't find resource
\n
"
);
ptr
=
LockResource
(
LoadResource
(
GetModuleHandle
(
0
),
res
));
WriteFile
(
file
,
ptr
,
SizeofResource
(
GetModuleHandle
(
0
),
res
),
&
written
,
NULL
);
ok
(
written
==
SizeofResource
(
GetModuleHandle
(
0
),
res
),
"couldn't write resource
\n
"
);
CloseHandle
(
file
);
return
filename
;
}
START_TEST
(
typelib
)
{
const
char
*
filename
;
ref_count_test
(
wszStdOle2
);
test_TypeComp
();
test_CreateDispTypeInfo
();
test_TypeInfo
();
test_QueryPathOfRegTypeLib
();
test_inheritance
();
test_dump_typelib
(
"test_tlb.tlb"
);
if
((
filename
=
create_test_typelib
()))
{
test_dump_typelib
(
filename
);
DeleteFile
(
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