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
cb1f4c53
Commit
cb1f4c53
authored
Sep 06, 2013
by
Andrew Eikum
Committed by
Alexandre Julliard
Sep 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Apply TKIND_DISPATCH changes to FUNCDESC results from ITypeComp::Bind.
parent
664e7938
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
2 deletions
+41
-2
typelib.c
dlls/oleaut32/tests/typelib.c
+32
-0
typelib.c
dlls/oleaut32/typelib.c
+9
-2
No files found.
dlls/oleaut32/tests/typelib.c
View file @
cb1f4c53
...
...
@@ -1539,6 +1539,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
static
OLECHAR
param2W
[]
=
{
'p'
,
'a'
,
'r'
,
'a'
,
'm'
,
'2'
,
0
};
static
OLECHAR
asdfW
[]
=
{
'A'
,
's'
,
'd'
,
'f'
,
0
};
static
OLECHAR
aliasW
[]
=
{
'a'
,
'l'
,
'i'
,
'a'
,
's'
,
0
};
static
OLECHAR
invokeW
[]
=
{
'I'
,
'n'
,
'v'
,
'o'
,
'k'
,
'e'
,
0
};
static
OLECHAR
*
names1
[]
=
{
func1W
,
param1W
,
param2W
};
static
OLECHAR
*
names2
[]
=
{
func2W
,
param1W
,
param2W
};
static
OLECHAR
*
propname
[]
=
{
prop1W
,
param1W
};
...
...
@@ -1555,6 +1556,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
ITypeLib
*
tl
,
*
stdole
;
ITypeInfo
*
interface1
,
*
interface2
,
*
dual
,
*
unknown
,
*
dispatch
,
*
ti
;
ITypeInfo2
*
ti2
;
ITypeComp
*
tcomp
;
FUNCDESC
funcdesc
,
*
pfuncdesc
;
ELEMDESC
elemdesc
[
5
],
*
edesc
;
PARAMDESCEX
paramdescex
;
...
...
@@ -1569,6 +1571,8 @@ static void test_CreateTypeLib(SYSKIND sys) {
VARIANT
cust_data
;
HRESULT
hres
;
TYPEKIND
kind
;
DESCKIND
desckind
;
BINDPTR
bindptr
;
switch
(
sys
){
case
SYS_WIN32
:
...
...
@@ -3443,6 +3447,34 @@ static void test_CreateTypeLib(SYSKIND sys) {
ok
(
typeattr
->
wMinorVerNum
==
0
,
"wMinorVerNum = %d
\n
"
,
typeattr
->
wMinorVerNum
);
ITypeInfo_ReleaseTypeAttr
(
ti
,
typeattr
);
hres
=
ITypeInfo_GetTypeComp
(
ti
,
&
tcomp
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
hres
=
ITypeComp_Bind
(
tcomp
,
invokeW
,
0
,
INVOKE_FUNC
,
&
interface1
,
&
desckind
,
&
bindptr
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ok
(
desckind
==
DESCKIND_FUNCDESC
,
"got wrong desckind: 0x%x
\n
"
,
desckind
);
ok
(
bindptr
.
lpfuncdesc
->
memid
==
0x60010003
,
"got %x
\n
"
,
bindptr
.
lpfuncdesc
->
memid
);
ok
(
bindptr
.
lpfuncdesc
->
lprgscode
==
NULL
,
"got %p
\n
"
,
bindptr
.
lpfuncdesc
->
lprgscode
);
ok
(
bindptr
.
lpfuncdesc
->
lprgelemdescParam
!=
NULL
,
"got %p
\n
"
,
bindptr
.
lpfuncdesc
->
lprgelemdescParam
);
ok
(
bindptr
.
lpfuncdesc
->
funckind
==
FUNC_DISPATCH
,
"got 0x%x
\n
"
,
bindptr
.
lpfuncdesc
->
funckind
);
ok
(
bindptr
.
lpfuncdesc
->
invkind
==
INVOKE_FUNC
,
"got 0x%x
\n
"
,
bindptr
.
lpfuncdesc
->
invkind
);
ok
(
bindptr
.
lpfuncdesc
->
callconv
==
CC_STDCALL
,
"got 0x%x
\n
"
,
bindptr
.
lpfuncdesc
->
callconv
);
ok
(
bindptr
.
lpfuncdesc
->
cParams
==
8
,
"got %d
\n
"
,
bindptr
.
lpfuncdesc
->
cParams
);
ok
(
bindptr
.
lpfuncdesc
->
cParamsOpt
==
0
,
"got %d
\n
"
,
bindptr
.
lpfuncdesc
->
cParamsOpt
);
#ifdef _WIN64
if
(
sys
==
SYS_WIN32
)
todo_wine
ok
(
bindptr
.
lpfuncdesc
->
oVft
==
6
*
sizeof
(
void
*
),
"got %x
\n
"
,
bindptr
.
lpfuncdesc
->
oVft
);
else
#endif
ok
(
bindptr
.
lpfuncdesc
->
oVft
==
6
*
sizeof
(
void
*
),
"got %x
\n
"
,
bindptr
.
lpfuncdesc
->
oVft
);
ok
(
bindptr
.
lpfuncdesc
->
cScodes
==
0
,
"got %d
\n
"
,
bindptr
.
lpfuncdesc
->
cScodes
);
ok
(
bindptr
.
lpfuncdesc
->
elemdescFunc
.
tdesc
.
vt
==
VT_VOID
,
"got %d
\n
"
,
bindptr
.
lpfuncdesc
->
elemdescFunc
.
tdesc
.
vt
);
ok
(
bindptr
.
lpfuncdesc
->
wFuncFlags
==
FUNCFLAG_FRESTRICTED
,
"got 0x%x
\n
"
,
bindptr
.
lpfuncdesc
->
wFuncFlags
);
ITypeInfo_ReleaseFuncDesc
(
interface1
,
bindptr
.
lpfuncdesc
);
ITypeInfo_Release
(
interface1
);
ITypeComp_Release
(
tcomp
);
hres
=
ITypeInfo_GetRefTypeOfImplType
(
ti
,
-
1
,
&
hreftype
);
ok
(
hres
==
S_OK
,
"got %08x
\n
"
,
hres
);
ok
(
hreftype
==
-
2
,
"got wrong hreftype: %x
\n
"
,
hreftype
);
...
...
dlls/oleaut32/typelib.c
View file @
cb1f4c53
...
...
@@ -8475,7 +8475,7 @@ static HRESULT WINAPI ITypeComp_fnBind(
for
(
fdc
=
0
;
fdc
<
This
->
cFuncs
;
++
fdc
){
pFDesc
=
&
This
->
funcdescs
[
fdc
];
if
(
!
strcmpiW
(
TLB_get_bstr
(
pFDesc
->
Name
),
szName
))
{
if
(
!
l
strcmpiW
(
TLB_get_bstr
(
pFDesc
->
Name
),
szName
))
{
if
(
!
wFlags
||
(
pFDesc
->
funcdesc
.
invkind
&
wFlags
))
break
;
else
...
...
@@ -8508,7 +8508,7 @@ static HRESULT WINAPI ITypeComp_fnBind(
return
S_OK
;
}
}
/* FIXME: search each inherited interface, not just the first */
if
(
hr
==
DISP_E_MEMBERNOTFOUND
&&
This
->
impltypes
)
{
/* recursive search */
ITypeInfo
*
pTInfo
;
...
...
@@ -8524,6 +8524,13 @@ static HRESULT WINAPI ITypeComp_fnBind(
{
hr
=
ITypeComp_Bind
(
pTComp
,
szName
,
lHash
,
wFlags
,
ppTInfo
,
pDescKind
,
pBindPtr
);
ITypeComp_Release
(
pTComp
);
if
(
SUCCEEDED
(
hr
)
&&
*
pDescKind
==
DESCKIND_FUNCDESC
&&
This
->
typekind
==
TKIND_DISPATCH
)
{
FUNCDESC
*
tmp
=
pBindPtr
->
lpfuncdesc
;
hr
=
TLB_AllocAndInitFuncDesc
(
tmp
,
&
pBindPtr
->
lpfuncdesc
,
TRUE
);
SysFreeString
((
BSTR
)
tmp
);
}
return
hr
;
}
WARN
(
"Could not search inherited interface!
\n
"
);
...
...
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