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
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(
...
@@ -686,6 +686,7 @@ serialize_param(
(
DWORD
*
)(((
LPBYTE
)
arg
)
+
vdesc
->
u
.
oInst
),
(
DWORD
*
)(((
LPBYTE
)
arg
)
+
vdesc
->
u
.
oInst
),
buf
buf
);
);
ITypeInfo_ReleaseVarDesc
(
tinfo2
,
vdesc
);
if
(
hres
!=
S_OK
)
if
(
hres
!=
S_OK
)
return
hres
;
return
hres
;
if
(
debugout
&&
(
i
<
(
tattr
->
cVars
-
1
)))
if
(
debugout
&&
(
i
<
(
tattr
->
cVars
-
1
)))
...
@@ -1432,7 +1433,7 @@ deserialize_DISPPARAM_ptr(
...
@@ -1432,7 +1433,7 @@ deserialize_DISPPARAM_ptr(
/* Searches function, also in inherited interfaces */
/* Searches function, also in inherited interfaces */
static
HRESULT
static
HRESULT
_get_funcdesc
(
_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
;
int
i
=
0
,
j
=
0
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -1440,6 +1441,9 @@ _get_funcdesc(
...
@@ -1440,6 +1441,9 @@ _get_funcdesc(
if
(
fname
)
*
fname
=
NULL
;
if
(
fname
)
*
fname
=
NULL
;
if
(
iname
)
*
iname
=
NULL
;
if
(
iname
)
*
iname
=
NULL
;
*
tactual
=
tinfo
;
ITypeInfo_AddRef
(
*
tactual
);
while
(
1
)
{
while
(
1
)
{
hres
=
ITypeInfo_GetFuncDesc
(
tinfo
,
i
,
fdesc
);
hres
=
ITypeInfo_GetFuncDesc
(
tinfo
,
i
,
fdesc
);
if
(
hres
)
{
if
(
hres
)
{
...
@@ -1464,7 +1468,7 @@ _get_funcdesc(
...
@@ -1464,7 +1468,7 @@ _get_funcdesc(
ERR
(
"Did not find a typeinfo for reftype %ld?
\n
"
,
href
);
ERR
(
"Did not find a typeinfo for reftype %ld?
\n
"
,
href
);
continue
;
continue
;
}
}
hres
=
_get_funcdesc
(
tinfo2
,
iMethod
,
fdesc
,
iname
,
fname
);
hres
=
_get_funcdesc
(
tinfo2
,
iMethod
,
tactual
,
fdesc
,
iname
,
fname
);
ITypeInfo_Release
(
tinfo2
);
ITypeInfo_Release
(
tinfo2
);
if
(
!
hres
)
return
S_OK
;
if
(
!
hres
)
return
S_OK
;
}
}
...
@@ -1496,12 +1500,14 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
...
@@ -1496,12 +1500,14 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
int
nrofnames
;
int
nrofnames
;
int
is_idispatch_getidsofnames
=
0
;
int
is_idispatch_getidsofnames
=
0
;
DWORD
remoteresult
=
0
;
DWORD
remoteresult
=
0
;
ITypeInfo
*
tinfo
;
EnterCriticalSection
(
&
tpinfo
->
crit
);
EnterCriticalSection
(
&
tpinfo
->
crit
);
hres
=
_get_funcdesc
(
tpinfo
->
tinfo
,
method
,
&
fdesc
,
&
iname
,
&
fname
);
hres
=
_get_funcdesc
(
tpinfo
->
tinfo
,
method
,
&
tinfo
,
&
fdesc
,
&
iname
,
&
fname
);
if
(
hres
)
{
if
(
hres
)
{
ERR
(
"Did not find typeinfo/funcdesc entry for method %d!
\n
"
,
method
);
ERR
(
"Did not find typeinfo/funcdesc entry for method %d!
\n
"
,
method
);
ITypeInfo_Release
(
tinfo
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
E_FAIL
;
return
E_FAIL
;
}
}
...
@@ -1509,6 +1515,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
...
@@ -1509,6 +1515,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
if
(
!
tpinfo
->
chanbuf
)
if
(
!
tpinfo
->
chanbuf
)
{
{
WARN
(
"Tried to use disconnected proxy
\n
"
);
WARN
(
"Tried to use disconnected proxy
\n
"
);
ITypeInfo_Release
(
tinfo
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
RPC_E_DISCONNECTED
;
return
RPC_E_DISCONNECTED
;
}
}
...
@@ -1537,6 +1544,8 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
...
@@ -1537,6 +1544,8 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
hres
=
serialize_IDispatch_GetIDsOfNames
(
TRUE
,
relaydeb
,
args
,
&
buf
);
hres
=
serialize_IDispatch_GetIDsOfNames
(
TRUE
,
relaydeb
,
args
,
&
buf
);
if
(
hres
!=
S_OK
)
{
if
(
hres
!=
S_OK
)
{
FIXME
(
"serialize of IDispatch::GetIDsOfNames failed!
\n
"
);
FIXME
(
"serialize of IDispatch::GetIDsOfNames failed!
\n
"
);
ITypeInfo_Release
(
tinfo
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
hres
;
return
hres
;
}
}
goto
afterserialize
;
goto
afterserialize
;
...
@@ -1553,7 +1562,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
...
@@ -1553,7 +1562,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
/* Need them for hack below */
/* Need them for hack below */
memset
(
names
,
0
,
sizeof
(
names
));
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
;
nrofnames
=
0
;
if
(
nrofnames
>
sizeof
(
names
)
/
sizeof
(
names
[
0
]))
if
(
nrofnames
>
sizeof
(
names
)
/
sizeof
(
names
[
0
]))
ERR
(
"Need more names!
\n
"
);
ERR
(
"Need more names!
\n
"
);
...
@@ -1582,7 +1591,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
...
@@ -1582,7 +1591,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
/* DISPPARAMS* needs special serializer */
/* DISPPARAMS* needs special serializer */
if
(
!
lstrcmpW
(
names
[
i
+
1
],
pdispparamsW
))
{
if
(
!
lstrcmpW
(
names
[
i
+
1
],
pdispparamsW
))
{
hres
=
serialize_DISPPARAM_ptr
(
hres
=
serialize_DISPPARAM_ptr
(
t
pinfo
->
t
info
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
relaydeb
,
relaydeb
,
FALSE
,
FALSE
,
...
@@ -1594,7 +1603,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
...
@@ -1594,7 +1603,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
}
}
if
(
!
lstrcmpW
(
names
[
i
+
1
],
ppvObjectW
))
{
if
(
!
lstrcmpW
(
names
[
i
+
1
],
ppvObjectW
))
{
hres
=
serialize_LPVOID_ptr
(
hres
=
serialize_LPVOID_ptr
(
t
pinfo
->
t
info
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
relaydeb
,
relaydeb
,
FALSE
,
FALSE
,
...
@@ -1608,7 +1617,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
...
@@ -1608,7 +1617,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
}
}
if
(
!
isserialized
)
if
(
!
isserialized
)
hres
=
serialize_param
(
hres
=
serialize_param
(
t
pinfo
->
t
info
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
relaydeb
,
relaydeb
,
FALSE
,
FALSE
,
...
@@ -1695,7 +1704,7 @@ afterserialize:
...
@@ -1695,7 +1704,7 @@ afterserialize:
/* deserialize DISPPARAM */
/* deserialize DISPPARAM */
if
(
!
lstrcmpW
(
names
[
i
+
1
],
pdispparamsW
))
{
if
(
!
lstrcmpW
(
names
[
i
+
1
],
pdispparamsW
))
{
hres
=
deserialize_DISPPARAM_ptr
(
hres
=
deserialize_DISPPARAM_ptr
(
t
pinfo
->
t
info
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
relaydeb
,
relaydeb
,
FALSE
,
FALSE
,
...
@@ -1711,7 +1720,7 @@ afterserialize:
...
@@ -1711,7 +1720,7 @@ afterserialize:
}
}
if
(
!
lstrcmpW
(
names
[
i
+
1
],
ppvObjectW
))
{
if
(
!
lstrcmpW
(
names
[
i
+
1
],
ppvObjectW
))
{
hres
=
deserialize_LPVOID_ptr
(
hres
=
deserialize_LPVOID_ptr
(
t
pinfo
->
t
info
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
relaydeb
,
relaydeb
,
FALSE
,
FALSE
,
...
@@ -1725,7 +1734,7 @@ afterserialize:
...
@@ -1725,7 +1734,7 @@ afterserialize:
}
}
if
(
!
isdeserialized
)
if
(
!
isdeserialized
)
hres
=
deserialize_param
(
hres
=
deserialize_param
(
t
pinfo
->
t
info
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
relaydeb
,
relaydeb
,
FALSE
,
FALSE
,
...
@@ -1750,6 +1759,7 @@ after_deserialize:
...
@@ -1750,6 +1759,7 @@ after_deserialize:
return
status
;
return
status
;
HeapFree
(
GetProcessHeap
(),
0
,
buf
.
base
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
.
base
);
ITypeInfo_Release
(
tinfo
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
remoteresult
;
return
remoteresult
;
}
}
...
@@ -1842,7 +1852,9 @@ PSFacBuf_CreateProxy(
...
@@ -1842,7 +1852,9 @@ PSFacBuf_CreateProxy(
int
j
;
int
j
;
/* nrofargs without This */
/* nrofargs without This */
int
nrofargs
;
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
)
{
if
(
hres
)
{
ERR
(
"GetFuncDesc %lx should not fail here.
\n
"
,
hres
);
ERR
(
"GetFuncDesc %lx should not fail here.
\n
"
,
hres
);
return
hres
;
return
hres
;
...
@@ -1976,6 +1988,7 @@ TMStubImpl_Invoke(
...
@@ -1976,6 +1988,7 @@ TMStubImpl_Invoke(
BSTR
names
[
10
];
BSTR
names
[
10
];
BSTR
fname
=
NULL
,
iname
=
NULL
;
BSTR
fname
=
NULL
,
iname
=
NULL
;
BOOL
is_idispatch_getidsofnames
=
0
;
BOOL
is_idispatch_getidsofnames
=
0
;
ITypeInfo
*
tinfo
;
memset
(
&
buf
,
0
,
sizeof
(
buf
));
memset
(
&
buf
,
0
,
sizeof
(
buf
));
buf
.
size
=
xmsg
->
cbBuffer
;
buf
.
size
=
xmsg
->
cbBuffer
;
...
@@ -1996,7 +2009,7 @@ TMStubImpl_Invoke(
...
@@ -1996,7 +2009,7 @@ TMStubImpl_Invoke(
xmsg
->
cbBuffer
=
buf
.
size
;
xmsg
->
cbBuffer
=
buf
.
size
;
return
hres
;
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
)
{
if
(
hres
)
{
ERR
(
"GetFuncDesc on method %ld failed with %lx
\n
"
,
xmsg
->
iMethod
,
hres
);
ERR
(
"GetFuncDesc on method %ld failed with %lx
\n
"
,
xmsg
->
iMethod
,
hres
);
return
hres
;
return
hres
;
...
@@ -2010,7 +2023,7 @@ TMStubImpl_Invoke(
...
@@ -2010,7 +2023,7 @@ TMStubImpl_Invoke(
/* Need them for hack below */
/* Need them for hack below */
memset
(
names
,
0
,
sizeof
(
names
));
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
]))
{
if
(
nrofnames
>
sizeof
(
names
)
/
sizeof
(
names
[
0
]))
{
ERR
(
"Need more names!
\n
"
);
ERR
(
"Need more names!
\n
"
);
}
}
...
@@ -2047,7 +2060,7 @@ TMStubImpl_Invoke(
...
@@ -2047,7 +2060,7 @@ TMStubImpl_Invoke(
/* deserialize DISPPARAM */
/* deserialize DISPPARAM */
if
(
!
lstrcmpW
(
names
[
i
+
1
],
pdispparamsW
))
{
if
(
!
lstrcmpW
(
names
[
i
+
1
],
pdispparamsW
))
{
hres
=
deserialize_DISPPARAM_ptr
(
hres
=
deserialize_DISPPARAM_ptr
(
This
->
tinfo
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
FALSE
,
FALSE
,
TRUE
,
TRUE
,
...
@@ -2063,7 +2076,7 @@ TMStubImpl_Invoke(
...
@@ -2063,7 +2076,7 @@ TMStubImpl_Invoke(
}
}
if
(
!
lstrcmpW
(
names
[
i
+
1
],
ppvObjectW
))
{
if
(
!
lstrcmpW
(
names
[
i
+
1
],
ppvObjectW
))
{
hres
=
deserialize_LPVOID_ptr
(
hres
=
deserialize_LPVOID_ptr
(
This
->
tinfo
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
FALSE
,
FALSE
,
TRUE
,
TRUE
,
...
@@ -2077,7 +2090,7 @@ TMStubImpl_Invoke(
...
@@ -2077,7 +2090,7 @@ TMStubImpl_Invoke(
}
}
if
(
!
isdeserialized
)
if
(
!
isdeserialized
)
hres
=
deserialize_param
(
hres
=
deserialize_param
(
This
->
tinfo
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FIN
,
FALSE
,
FALSE
,
TRUE
,
TRUE
,
...
@@ -2129,7 +2142,7 @@ afterdeserialize:
...
@@ -2129,7 +2142,7 @@ afterdeserialize:
/* DISPPARAMS* needs special serializer */
/* DISPPARAMS* needs special serializer */
if
(
!
lstrcmpW
(
names
[
i
+
1
],
pdispparamsW
))
{
if
(
!
lstrcmpW
(
names
[
i
+
1
],
pdispparamsW
))
{
hres
=
serialize_DISPPARAM_ptr
(
hres
=
serialize_DISPPARAM_ptr
(
This
->
tinfo
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
FALSE
,
FALSE
,
TRUE
,
TRUE
,
...
@@ -2141,7 +2154,7 @@ afterdeserialize:
...
@@ -2141,7 +2154,7 @@ afterdeserialize:
}
}
if
(
!
lstrcmpW
(
names
[
i
+
1
],
ppvObjectW
))
{
if
(
!
lstrcmpW
(
names
[
i
+
1
],
ppvObjectW
))
{
hres
=
serialize_LPVOID_ptr
(
hres
=
serialize_LPVOID_ptr
(
This
->
tinfo
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
FALSE
,
FALSE
,
TRUE
,
TRUE
,
...
@@ -2155,7 +2168,7 @@ afterdeserialize:
...
@@ -2155,7 +2168,7 @@ afterdeserialize:
}
}
if
(
!
isserialized
)
if
(
!
isserialized
)
hres
=
serialize_param
(
hres
=
serialize_param
(
This
->
tinfo
,
tinfo
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
elem
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FOUT
,
FALSE
,
FALSE
,
TRUE
,
TRUE
,
...
@@ -2173,7 +2186,8 @@ afterserialize:
...
@@ -2173,7 +2186,8 @@ afterserialize:
hres
=
xbuf_add
(
&
buf
,
(
LPBYTE
)
&
res
,
sizeof
(
DWORD
));
hres
=
xbuf_add
(
&
buf
,
(
LPBYTE
)
&
res
,
sizeof
(
DWORD
));
if
(
hres
!=
S_OK
)
if
(
hres
!=
S_OK
)
return
hres
;
return
hres
;
ITypeInfo_Release
(
tinfo
);
xmsg
->
cbBuffer
=
buf
.
curoff
;
xmsg
->
cbBuffer
=
buf
.
curoff
;
I_RpcGetBuffer
((
RPC_MESSAGE
*
)
xmsg
);
I_RpcGetBuffer
((
RPC_MESSAGE
*
)
xmsg
);
memcpy
(
xmsg
->
Buffer
,
buf
.
base
,
buf
.
curoff
);
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