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
16000c61
Commit
16000c61
authored
Aug 26, 2014
by
Guillaume Charifi
Committed by
Alexandre Julliard
Aug 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Add test for TLB dependencies lookup in resources.
parent
be415f3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
96 additions
and
0 deletions
+96
-0
typelib.c
dlls/oleaut32/tests/typelib.c
+96
-0
No files found.
dlls/oleaut32/tests/typelib.c
View file @
16000c61
...
@@ -5509,6 +5509,101 @@ static void test_stub(void)
...
@@ -5509,6 +5509,101 @@ static void test_stub(void)
CoUninitialize
();
CoUninitialize
();
}
}
static
void
test_dep
(
void
)
{
HRESULT
hr
;
const
char
*
refFilename
;
WCHAR
refFilenameW
[
MAX_PATH
];
ITypeLib
*
preftLib
;
ITypeInfo
*
preftInfo
;
char
filename
[
MAX_PATH
];
WCHAR
filenameW
[
MAX_PATH
];
ICreateTypeLib2
*
pctLib
;
ICreateTypeInfo
*
pctInfo
;
ITypeLib
*
ptLib
;
ITypeInfo
*
ptInfo
;
ITypeInfo
*
ptInfoExt
=
NULL
;
HREFTYPE
refType
;
static
WCHAR
ifacenameW
[]
=
{
'I'
,
'T'
,
'e'
,
's'
,
't'
,
'D'
,
'e'
,
'p'
,
0
};
static
const
GUID
libguid
=
{
0xe0228f26
,
0x2946
,
0x478c
,{
0xb6
,
0x4a
,
0x93
,
0xfe
,
0xef
,
0xa5
,
0x05
,
0x32
}};
static
const
GUID
ifaceguid
=
{
0x394376dd
,
0x3bb8
,
0x4804
,{
0x8c
,
0xcc
,
0x95
,
0x59
,
0x43
,
0x40
,
0x04
,
0xf3
}};
trace
(
"Starting typelib dependency tests
\n
"
);
refFilename
=
create_test_typelib
(
2
);
MultiByteToWideChar
(
CP_ACP
,
0
,
refFilename
,
-
1
,
refFilenameW
,
MAX_PATH
);
hr
=
LoadTypeLibEx
(
refFilenameW
,
REGKIND_NONE
,
&
preftLib
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
ITypeLib_GetTypeInfoOfGuid
(
preftLib
,
&
IID_ISimpleIface
,
&
preftInfo
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
GetTempFileNameA
(
"."
,
"tlb"
,
0
,
filename
);
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
filenameW
,
MAX_PATH
);
if
(
sizeof
(
void
*
)
==
8
)
{
hr
=
CreateTypeLib2
(
SYS_WIN64
,
filenameW
,
&
pctLib
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
}
else
{
hr
=
CreateTypeLib2
(
SYS_WIN32
,
filenameW
,
&
pctLib
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
}
hr
=
ICreateTypeLib2_SetGuid
(
pctLib
,
&
libguid
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
ICreateTypeLib2_SetLcid
(
pctLib
,
LOCALE_NEUTRAL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
ICreateTypeLib2_CreateTypeInfo
(
pctLib
,
ifacenameW
,
TKIND_INTERFACE
,
&
pctInfo
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
ICreateTypeInfo_SetGuid
(
pctInfo
,
&
ifaceguid
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
ICreateTypeInfo_SetTypeFlags
(
pctInfo
,
TYPEFLAG_FOLEAUTOMATION
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
ICreateTypeInfo_AddRefTypeInfo
(
pctInfo
,
preftInfo
,
&
refType
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
ICreateTypeInfo_AddImplType
(
pctInfo
,
0
,
refType
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ICreateTypeInfo_Release
(
pctInfo
);
hr
=
ICreateTypeLib2_SaveAllChanges
(
pctLib
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ICreateTypeLib2_Release
(
pctLib
);
ITypeInfo_Release
(
preftInfo
);
ITypeLib_Release
(
preftLib
);
DeleteFileW
(
refFilenameW
);
hr
=
LoadTypeLibEx
(
filenameW
,
REGKIND_NONE
,
&
ptLib
);
ok
(
hr
==
S_OK
,
"got: %x
\n
"
,
hr
);
hr
=
ITypeLib_GetTypeInfoOfGuid
(
ptLib
,
&
ifaceguid
,
&
ptInfo
);
ok
(
hr
==
S_OK
,
"got: %x
\n
"
,
hr
);
hr
=
ITypeInfo_GetRefTypeOfImplType
(
ptInfo
,
0
,
&
refType
);
ok
(
hr
==
S_OK
,
"got: %x
\n
"
,
hr
);
hr
=
ITypeInfo_GetRefTypeInfo
(
ptInfo
,
refType
,
&
ptInfoExt
);
todo_wine
ok
(
hr
==
S_OK
||
broken
(
hr
==
TYPE_E_CANTLOADLIBRARY
)
/* win 2000 */
,
"got: %x
\n
"
,
hr
);
ITypeInfo_Release
(
ptInfo
);
if
(
ptInfoExt
)
ITypeInfo_Release
(
ptInfoExt
);
ITypeLib_Release
(
ptLib
);
DeleteFileW
(
filenameW
);
}
START_TEST
(
typelib
)
START_TEST
(
typelib
)
{
{
const
char
*
filename
;
const
char
*
filename
;
...
@@ -5548,4 +5643,5 @@ START_TEST(typelib)
...
@@ -5548,4 +5643,5 @@ START_TEST(typelib)
test_LoadRegTypeLib
();
test_LoadRegTypeLib
();
test_GetLibAttr
();
test_GetLibAttr
();
test_stub
();
test_stub
();
test_dep
();
}
}
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