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
c6296c41
Commit
c6296c41
authored
Jun 01, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Jun 01, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If we are accessing a method from a superclass then we need to use the
superclass's ITypeInfo otherwise we could get errors when accessing hreftypes that aren't present in the subclass.
parent
9ddf17bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
20 deletions
+34
-20
tmarshal.c
dlls/oleaut32/tmarshal.c
+34
-20
No files found.
dlls/oleaut32/tmarshal.c
View file @
c6296c41
...
...
@@ -686,6 +686,7 @@ serialize_param(
(
DWORD
*
)(((
LPBYTE
)
arg
)
+
vdesc
->
u
.
oInst
),
buf
);
ITypeInfo_ReleaseVarDesc
(
tinfo2
,
vdesc
);
if
(
hres
!=
S_OK
)
return
hres
;
if
(
debugout
&&
(
i
<
(
tattr
->
cVars
-
1
)))
...
...
@@ -1432,7 +1433,7 @@ deserialize_DISPPARAM_ptr(
/* Searches function, also in inherited interfaces */
static
HRESULT
_get_funcdesc
(
ITypeInfo
*
tinfo
,
int
iMethod
,
FUNCDESC
**
fdesc
,
BSTR
*
iname
,
BSTR
*
fname
)
ITypeInfo
*
tinfo
,
int
iMethod
,
ITypeInfo
**
tactual
,
FUNCDESC
**
fdesc
,
BSTR
*
iname
,
BSTR
*
fname
)
{
int
i
=
0
,
j
=
0
;
HRESULT
hres
;
...
...
@@ -1440,6 +1441,9 @@ _get_funcdesc(
if
(
fname
)
*
fname
=
NULL
;
if
(
iname
)
*
iname
=
NULL
;
*
tactual
=
tinfo
;
ITypeInfo_AddRef
(
*
tactual
);
while
(
1
)
{
hres
=
ITypeInfo_GetFuncDesc
(
tinfo
,
i
,
fdesc
);
if
(
hres
)
{
...
...
@@ -1464,7 +1468,7 @@ _get_funcdesc(
ERR
(
"Did not find a typeinfo for reftype %ld?
\n
"
,
href
);
continue
;
}
hres
=
_get_funcdesc
(
tinfo2
,
iMethod
,
fdesc
,
iname
,
fname
);
hres
=
_get_funcdesc
(
tinfo2
,
iMethod
,
tactual
,
fdesc
,
iname
,
fname
);
ITypeInfo_Release
(
tinfo2
);
if
(
!
hres
)
return
S_OK
;
}
...
...
@@ -1496,12 +1500,14 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
int
nrofnames
;
int
is_idispatch_getidsofnames
=
0
;
DWORD
remoteresult
=
0
;
ITypeInfo
*
tinfo
;
EnterCriticalSection
(
&
tpinfo
->
crit
);
hres
=
_get_funcdesc
(
tpinfo
->
tinfo
,
method
,
&
fdesc
,
&
iname
,
&
fname
);
hres
=
_get_funcdesc
(
tpinfo
->
tinfo
,
method
,
&
tinfo
,
&
fdesc
,
&
iname
,
&
fname
);
if
(
hres
)
{
ERR
(
"Did not find typeinfo/funcdesc entry for method %d!
\n
"
,
method
);
ITypeInfo_Release
(
tinfo
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
E_FAIL
;
}
...
...
@@ -1509,6 +1515,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
if
(
!
tpinfo
->
chanbuf
)
{
WARN
(
"Tried to use disconnected proxy
\n
"
);
ITypeInfo_Release
(
tinfo
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
RPC_E_DISCONNECTED
;
}
...
...
@@ -1537,6 +1544,8 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
hres
=
serialize_IDispatch_GetIDsOfNames
(
TRUE
,
relaydeb
,
args
,
&
buf
);
if
(
hres
!=
S_OK
)
{
FIXME
(
"serialize of IDispatch::GetIDsOfNames failed!
\n
"
);
ITypeInfo_Release
(
tinfo
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
hres
;
}
goto
afterserialize
;
...
...
@@ -1553,7 +1562,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
/* Need them for hack below */
memset
(
names
,
0
,
sizeof
(
names
));
if
(
ITypeInfo_GetNames
(
t
pinfo
->
t
info
,
fdesc
->
memid
,
names
,
sizeof
(
names
)
/
sizeof
(
names
[
0
]),
&
nrofnames
))
if
(
ITypeInfo_GetNames
(
tinfo
,
fdesc
->
memid
,
names
,
sizeof
(
names
)
/
sizeof
(
names
[
0
]),
&
nrofnames
))
nrofnames
=
0
;
if
(
nrofnames
>
sizeof
(
names
)
/
sizeof
(
names
[
0
]))
ERR
(
"Need more names!
\n
"
);
...
...
@@ -1582,7 +1591,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
/* DISPPARAMS* needs special serializer */
if
(
!
lstrcmpW
(
names
[
i
+
1
],
pdispparamsW
))
{
hres
=
serialize_DISPPARAM_ptr
(
t
pinfo
->
t
info
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
relaydeb
,
FALSE
,
...
...
@@ -1594,7 +1603,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
}
if
(
!
lstrcmpW
(
names
[
i
+
1
],
ppvObjectW
))
{
hres
=
serialize_LPVOID_ptr
(
t
pinfo
->
t
info
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
relaydeb
,
FALSE
,
...
...
@@ -1608,7 +1617,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
}
if
(
!
isserialized
)
hres
=
serialize_param
(
t
pinfo
->
t
info
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
relaydeb
,
FALSE
,
...
...
@@ -1695,7 +1704,7 @@ afterserialize:
/* deserialize DISPPARAM */
if
(
!
lstrcmpW
(
names
[
i
+
1
],
pdispparamsW
))
{
hres
=
deserialize_DISPPARAM_ptr
(
t
pinfo
->
t
info
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
relaydeb
,
FALSE
,
...
...
@@ -1711,7 +1720,7 @@ afterserialize:
}
if
(
!
lstrcmpW
(
names
[
i
+
1
],
ppvObjectW
))
{
hres
=
deserialize_LPVOID_ptr
(
t
pinfo
->
t
info
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
relaydeb
,
FALSE
,
...
...
@@ -1725,7 +1734,7 @@ afterserialize:
}
if
(
!
isdeserialized
)
hres
=
deserialize_param
(
t
pinfo
->
t
info
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
relaydeb
,
FALSE
,
...
...
@@ -1750,6 +1759,7 @@ after_deserialize:
return
status
;
HeapFree
(
GetProcessHeap
(),
0
,
buf
.
base
);
ITypeInfo_Release
(
tinfo
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
remoteresult
;
}
...
...
@@ -1842,7 +1852,9 @@ PSFacBuf_CreateProxy(
int
j
;
/* nrofargs without This */
int
nrofargs
;
hres
=
_get_funcdesc
(
tinfo
,
i
,
&
fdesc
,
NULL
,
NULL
);
ITypeInfo
*
tinfo2
;
hres
=
_get_funcdesc
(
tinfo
,
i
,
&
tinfo2
,
&
fdesc
,
NULL
,
NULL
);
ITypeInfo_Release
(
tinfo2
);
if
(
hres
)
{
ERR
(
"GetFuncDesc %lx should not fail here.
\n
"
,
hres
);
return
hres
;
...
...
@@ -1976,6 +1988,7 @@ TMStubImpl_Invoke(
BSTR
names
[
10
];
BSTR
fname
=
NULL
,
iname
=
NULL
;
BOOL
is_idispatch_getidsofnames
=
0
;
ITypeInfo
*
tinfo
;
memset
(
&
buf
,
0
,
sizeof
(
buf
));
buf
.
size
=
xmsg
->
cbBuffer
;
...
...
@@ -1996,7 +2009,7 @@ TMStubImpl_Invoke(
xmsg
->
cbBuffer
=
buf
.
size
;
return
hres
;
}
hres
=
_get_funcdesc
(
This
->
tinfo
,
xmsg
->
iMethod
,
&
fdesc
,
&
iname
,
&
fname
);
hres
=
_get_funcdesc
(
This
->
tinfo
,
xmsg
->
iMethod
,
&
tinfo
,
&
fdesc
,
&
iname
,
&
fname
);
if
(
hres
)
{
ERR
(
"GetFuncDesc on method %ld failed with %lx
\n
"
,
xmsg
->
iMethod
,
hres
);
return
hres
;
...
...
@@ -2010,7 +2023,7 @@ TMStubImpl_Invoke(
/* Need them for hack below */
memset
(
names
,
0
,
sizeof
(
names
));
ITypeInfo_GetNames
(
This
->
tinfo
,
fdesc
->
memid
,
names
,
sizeof
(
names
)
/
sizeof
(
names
[
0
]),
&
nrofnames
);
ITypeInfo_GetNames
(
tinfo
,
fdesc
->
memid
,
names
,
sizeof
(
names
)
/
sizeof
(
names
[
0
]),
&
nrofnames
);
if
(
nrofnames
>
sizeof
(
names
)
/
sizeof
(
names
[
0
]))
{
ERR
(
"Need more names!
\n
"
);
}
...
...
@@ -2047,7 +2060,7 @@ TMStubImpl_Invoke(
/* deserialize DISPPARAM */
if
(
!
lstrcmpW
(
names
[
i
+
1
],
pdispparamsW
))
{
hres
=
deserialize_DISPPARAM_ptr
(
This
->
tinfo
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
FALSE
,
TRUE
,
...
...
@@ -2063,7 +2076,7 @@ TMStubImpl_Invoke(
}
if
(
!
lstrcmpW
(
names
[
i
+
1
],
ppvObjectW
))
{
hres
=
deserialize_LPVOID_ptr
(
This
->
tinfo
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
FALSE
,
TRUE
,
...
...
@@ -2077,7 +2090,7 @@ TMStubImpl_Invoke(
}
if
(
!
isdeserialized
)
hres
=
deserialize_param
(
This
->
tinfo
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
FALSE
,
TRUE
,
...
...
@@ -2129,7 +2142,7 @@ afterdeserialize:
/* DISPPARAMS* needs special serializer */
if
(
!
lstrcmpW
(
names
[
i
+
1
],
pdispparamsW
))
{
hres
=
serialize_DISPPARAM_ptr
(
This
->
tinfo
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
FALSE
,
TRUE
,
...
...
@@ -2141,7 +2154,7 @@ afterdeserialize:
}
if
(
!
lstrcmpW
(
names
[
i
+
1
],
ppvObjectW
))
{
hres
=
serialize_LPVOID_ptr
(
This
->
tinfo
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
FALSE
,
TRUE
,
...
...
@@ -2155,7 +2168,7 @@ afterdeserialize:
}
if
(
!
isserialized
)
hres
=
serialize_param
(
This
->
tinfo
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
FALSE
,
TRUE
,
...
...
@@ -2173,7 +2186,8 @@ afterserialize:
hres
=
xbuf_add
(
&
buf
,
(
LPBYTE
)
&
res
,
sizeof
(
DWORD
));
if
(
hres
!=
S_OK
)
return
hres
;
ITypeInfo_Release
(
tinfo
);
xmsg
->
cbBuffer
=
buf
.
curoff
;
I_RpcGetBuffer
((
RPC_MESSAGE
*
)
xmsg
);
memcpy
(
xmsg
->
Buffer
,
buf
.
base
,
buf
.
curoff
);
...
...
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