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
cdb72b09
Commit
cdb72b09
authored
Feb 10, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Return missing function custom data as VT_EMPTY.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
af2edc17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
typelib.c
dlls/oleaut32/tests/typelib.c
+24
-0
typelib.c
dlls/oleaut32/typelib.c
+3
-8
No files found.
dlls/oleaut32/tests/typelib.c
View file @
cdb72b09
...
...
@@ -4798,13 +4798,17 @@ static void test_dump_typelib(const WCHAR *name)
{
ITypeLib
*
typelib
;
int
ticount
=
ARRAY_SIZE
(
info
);
CUSTDATA
cust_data
;
int
iface
,
func
;
VARIANT
v
;
HRESULT
hr
;
ole_check
(
LoadTypeLibEx
(
name
,
REGKIND_NONE
,
&
typelib
));
expect_eq
(
ITypeLib_GetTypeInfoCount
(
typelib
),
ticount
,
UINT
,
"%d"
);
for
(
iface
=
0
;
iface
<
ticount
;
iface
++
)
{
const
type_info
*
ti
=
&
info
[
iface
];
ITypeInfo2
*
typeinfo2
;
ITypeInfo
*
typeinfo
;
TYPEATTR
*
typeattr
;
BSTR
bstrIfName
;
...
...
@@ -4845,6 +4849,9 @@ static void test_dump_typelib(const WCHAR *name)
if
(
hr
==
S_OK
)
ITypeInfo_Release
(
typeinfo2
);
}
hr
=
ITypeInfo_QueryInterface
(
typeinfo
,
&
IID_ITypeInfo2
,
(
void
**
)
&
typeinfo2
);
ok
(
hr
==
S_OK
,
"Could not get ITypeInfo2: %08x
\n
"
,
hr
);
for
(
func
=
0
;
func
<
typeattr
->
cFuncs
;
func
++
)
{
const
function_info
*
fn_info
=
&
ti
->
funcs
[
func
];
...
...
@@ -4893,10 +4900,27 @@ static void test_dump_typelib(const WCHAR *name)
}
expect_int
(
fn_info
->
params
[
desc
->
cParams
].
vt
,
(
VARTYPE
)
-
1
);
V_VT
(
&
v
)
=
VT_ERROR
;
hr
=
ITypeInfo2_GetFuncCustData
(
typeinfo2
,
func
,
&
IID_NULL
,
&
v
);
ok
(
hr
==
S_OK
,
"GetFuncCustData failed: %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_EMPTY
,
"V_VT(&v) = %d
\n
"
,
V_VT
(
&
v
));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_ERROR
;
hr
=
ITypeInfo2_GetFuncCustData
(
typeinfo2
,
func
,
&
IID_IBaseIface
,
&
v
);
ok
(
hr
==
S_OK
,
"GetFuncCustData failed: %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_EMPTY
,
"V_VT(&v) = %d
\n
"
,
V_VT
(
&
v
));
VariantClear
(
&
v
);
memset
(
&
cust_data
,
0
,
sizeof
(
cust_data
));
hr
=
ITypeInfo2_GetAllCustData
(
typeinfo2
,
&
cust_data
);
ITypeInfo_ReleaseFuncDesc
(
typeinfo
,
desc
);
ClearCustData
(
&
cust_data
);
}
ITypeInfo_ReleaseTypeAttr
(
typeinfo
,
typeattr
);
ITypeInfo2_Release
(
typeinfo2
);
ITypeInfo_Release
(
typeinfo
);
}
ITypeLib_Release
(
typelib
);
...
...
dlls/oleaut32/typelib.c
View file @
cdb72b09
...
...
@@ -8387,8 +8387,8 @@ static HRESULT WINAPI ITypeInfo2_fnGetFuncCustData(
VARIANT
*
pVarVal
)
{
ITypeInfoImpl
*
This
=
impl_from_ITypeInfo2
(
iface
);
TLBCustData
*
pCData
;
const
TLBFuncDesc
*
desc
;
TLBCustData
*
data
;
UINT
hrefoffset
;
HRESULT
hr
;
...
...
@@ -8401,14 +8401,9 @@ static HRESULT WINAPI ITypeInfo2_fnGetFuncCustData(
return
hr
;
}
pCData
=
TLB_get_custdata_by_guid
(
&
desc
->
custdata_list
,
guid
);
if
(
!
pCData
)
return
TYPE_E_ELEMENTNOTFOUND
;
VariantInit
(
pVarVal
);
VariantCopy
(
pVarVal
,
&
pCData
->
data
);
return
S_OK
;
data
=
TLB_get_custdata_by_guid
(
&
desc
->
custdata_list
,
guid
);
return
data
?
VariantCopy
(
pVarVal
,
&
data
->
data
)
:
S_OK
;
}
/* ITypeInfo2::GetParamCustData
...
...
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