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
0b5c0855
Commit
0b5c0855
authored
Oct 14, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Store destination context and context data in server channel.
parent
3099a254
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
18 deletions
+19
-18
compobj_private.h
dlls/ole32/compobj_private.h
+4
-3
marshal.c
dlls/ole32/marshal.c
+6
-5
rpc.c
dlls/ole32/rpc.c
+4
-6
stubmanager.c
dlls/ole32/stubmanager.c
+5
-4
No files found.
dlls/ole32/compobj_private.h
View file @
0b5c0855
...
@@ -185,7 +185,8 @@ ULONG stub_manager_int_release(struct stub_manager *This) DECLSPEC_HIDDEN;
...
@@ -185,7 +185,8 @@ ULONG stub_manager_int_release(struct stub_manager *This) DECLSPEC_HIDDEN;
struct
stub_manager
*
new_stub_manager
(
APARTMENT
*
apt
,
IUnknown
*
object
)
DECLSPEC_HIDDEN
;
struct
stub_manager
*
new_stub_manager
(
APARTMENT
*
apt
,
IUnknown
*
object
)
DECLSPEC_HIDDEN
;
ULONG
stub_manager_ext_addref
(
struct
stub_manager
*
m
,
ULONG
refs
,
BOOL
tableweak
)
DECLSPEC_HIDDEN
;
ULONG
stub_manager_ext_addref
(
struct
stub_manager
*
m
,
ULONG
refs
,
BOOL
tableweak
)
DECLSPEC_HIDDEN
;
ULONG
stub_manager_ext_release
(
struct
stub_manager
*
m
,
ULONG
refs
,
BOOL
tableweak
,
BOOL
last_unlock_releases
)
DECLSPEC_HIDDEN
;
ULONG
stub_manager_ext_release
(
struct
stub_manager
*
m
,
ULONG
refs
,
BOOL
tableweak
,
BOOL
last_unlock_releases
)
DECLSPEC_HIDDEN
;
struct
ifstub
*
stub_manager_new_ifstub
(
struct
stub_manager
*
m
,
IRpcStubBuffer
*
sb
,
IUnknown
*
iptr
,
REFIID
iid
,
MSHLFLAGS
flags
)
DECLSPEC_HIDDEN
;
struct
ifstub
*
stub_manager_new_ifstub
(
struct
stub_manager
*
m
,
IRpcStubBuffer
*
sb
,
IUnknown
*
iptr
,
REFIID
iid
,
DWORD
dest_context
,
void
*
dest_context_data
,
MSHLFLAGS
flags
)
DECLSPEC_HIDDEN
;
struct
ifstub
*
stub_manager_find_ifstub
(
struct
stub_manager
*
m
,
REFIID
iid
,
MSHLFLAGS
flags
)
DECLSPEC_HIDDEN
;
struct
ifstub
*
stub_manager_find_ifstub
(
struct
stub_manager
*
m
,
REFIID
iid
,
MSHLFLAGS
flags
)
DECLSPEC_HIDDEN
;
struct
stub_manager
*
get_stub_manager
(
APARTMENT
*
apt
,
OID
oid
)
DECLSPEC_HIDDEN
;
struct
stub_manager
*
get_stub_manager
(
APARTMENT
*
apt
,
OID
oid
)
DECLSPEC_HIDDEN
;
struct
stub_manager
*
get_stub_manager_from_object
(
APARTMENT
*
apt
,
void
*
object
)
DECLSPEC_HIDDEN
;
struct
stub_manager
*
get_stub_manager_from_object
(
APARTMENT
*
apt
,
void
*
object
)
DECLSPEC_HIDDEN
;
...
@@ -195,7 +196,7 @@ void stub_manager_release_marshal_data(struct stub_manager *m, ULONG refs, const
...
@@ -195,7 +196,7 @@ void stub_manager_release_marshal_data(struct stub_manager *m, ULONG refs, const
HRESULT
ipid_get_dispatch_params
(
const
IPID
*
ipid
,
APARTMENT
**
stub_apt
,
IRpcStubBuffer
**
stub
,
IRpcChannelBuffer
**
chan
,
IID
*
iid
,
IUnknown
**
iface
)
DECLSPEC_HIDDEN
;
HRESULT
ipid_get_dispatch_params
(
const
IPID
*
ipid
,
APARTMENT
**
stub_apt
,
IRpcStubBuffer
**
stub
,
IRpcChannelBuffer
**
chan
,
IID
*
iid
,
IUnknown
**
iface
)
DECLSPEC_HIDDEN
;
HRESULT
start_apartment_remote_unknown
(
void
)
DECLSPEC_HIDDEN
;
HRESULT
start_apartment_remote_unknown
(
void
)
DECLSPEC_HIDDEN
;
HRESULT
marshal_object
(
APARTMENT
*
apt
,
STDOBJREF
*
stdobjref
,
REFIID
riid
,
IUnknown
*
obj
,
MSHLFLAGS
mshlflags
)
DECLSPEC_HIDDEN
;
HRESULT
marshal_object
(
APARTMENT
*
apt
,
STDOBJREF
*
stdobjref
,
REFIID
riid
,
IUnknown
*
obj
,
DWORD
dest_context
,
void
*
dest_context_data
,
MSHLFLAGS
mshlflags
)
DECLSPEC_HIDDEN
;
/* RPC Backend */
/* RPC Backend */
...
@@ -206,7 +207,7 @@ HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid,
...
@@ -206,7 +207,7 @@ HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid,
const
OXID_INFO
*
oxid_info
,
const
OXID_INFO
*
oxid_info
,
DWORD
dest_context
,
void
*
dest_context_data
,
DWORD
dest_context
,
void
*
dest_context_data
,
IRpcChannelBuffer
**
chan
)
DECLSPEC_HIDDEN
;
IRpcChannelBuffer
**
chan
)
DECLSPEC_HIDDEN
;
HRESULT
RPC_CreateServerChannel
(
IRpcChannelBuffer
**
chan
)
DECLSPEC_HIDDEN
;
HRESULT
RPC_CreateServerChannel
(
DWORD
dest_context
,
void
*
dest_context_data
,
IRpcChannelBuffer
**
chan
)
DECLSPEC_HIDDEN
;
void
RPC_ExecuteCall
(
struct
dispatch_params
*
params
)
DECLSPEC_HIDDEN
;
void
RPC_ExecuteCall
(
struct
dispatch_params
*
params
)
DECLSPEC_HIDDEN
;
HRESULT
RPC_RegisterInterface
(
REFIID
riid
)
DECLSPEC_HIDDEN
;
HRESULT
RPC_RegisterInterface
(
REFIID
riid
)
DECLSPEC_HIDDEN
;
void
RPC_UnregisterInterface
(
REFIID
riid
)
DECLSPEC_HIDDEN
;
void
RPC_UnregisterInterface
(
REFIID
riid
)
DECLSPEC_HIDDEN
;
...
...
dlls/ole32/marshal.c
View file @
0b5c0855
...
@@ -115,7 +115,8 @@ static inline HRESULT get_facbuf_for_iid(REFIID riid, IPSFactoryBuffer **facbuf)
...
@@ -115,7 +115,8 @@ static inline HRESULT get_facbuf_for_iid(REFIID riid, IPSFactoryBuffer **facbuf)
}
}
/* marshals an object into a STDOBJREF structure */
/* marshals an object into a STDOBJREF structure */
HRESULT
marshal_object
(
APARTMENT
*
apt
,
STDOBJREF
*
stdobjref
,
REFIID
riid
,
IUnknown
*
object
,
MSHLFLAGS
mshlflags
)
HRESULT
marshal_object
(
APARTMENT
*
apt
,
STDOBJREF
*
stdobjref
,
REFIID
riid
,
IUnknown
*
object
,
DWORD
dest_context
,
void
*
dest_context_data
,
MSHLFLAGS
mshlflags
)
{
{
struct
stub_manager
*
manager
;
struct
stub_manager
*
manager
;
struct
ifstub
*
ifstub
;
struct
ifstub
*
ifstub
;
...
@@ -192,7 +193,7 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
...
@@ -192,7 +193,7 @@ HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnkno
/* make sure ifstub that we are creating is unique */
/* make sure ifstub that we are creating is unique */
ifstub
=
stub_manager_find_ifstub
(
manager
,
riid
,
mshlflags
);
ifstub
=
stub_manager_find_ifstub
(
manager
,
riid
,
mshlflags
);
if
(
!
ifstub
)
if
(
!
ifstub
)
ifstub
=
stub_manager_new_ifstub
(
manager
,
stub
,
iobject
,
riid
,
mshlflags
);
ifstub
=
stub_manager_new_ifstub
(
manager
,
stub
,
iobject
,
riid
,
dest_context
,
dest_context_data
,
mshlflags
);
if
(
stub
)
IRpcStubBuffer_Release
(
stub
);
if
(
stub
)
IRpcStubBuffer_Release
(
stub
);
IUnknown_Release
(
iobject
);
IUnknown_Release
(
iobject
);
...
@@ -1225,8 +1226,8 @@ StdMarshalImpl_GetMarshalSizeMax(
...
@@ -1225,8 +1226,8 @@ StdMarshalImpl_GetMarshalSizeMax(
static
HRESULT
WINAPI
static
HRESULT
WINAPI
StdMarshalImpl_MarshalInterface
(
StdMarshalImpl_MarshalInterface
(
LPMARSHAL
iface
,
IStream
*
pStm
,
REFIID
riid
,
void
*
pv
,
DWORD
d
wDestC
ontext
,
LPMARSHAL
iface
,
IStream
*
pStm
,
REFIID
riid
,
void
*
pv
,
DWORD
d
est_c
ontext
,
void
*
pvDestContext
,
DWORD
mshlflags
)
void
*
dest_context_data
,
DWORD
mshlflags
)
{
{
STDOBJREF
stdobjref
;
STDOBJREF
stdobjref
;
ULONG
res
;
ULONG
res
;
...
@@ -1244,7 +1245,7 @@ StdMarshalImpl_MarshalInterface(
...
@@ -1244,7 +1245,7 @@ StdMarshalImpl_MarshalInterface(
/* make sure this apartment can be reached from other threads / processes */
/* make sure this apartment can be reached from other threads / processes */
RPC_StartRemoting
(
apt
);
RPC_StartRemoting
(
apt
);
hres
=
marshal_object
(
apt
,
&
stdobjref
,
riid
,
pv
,
mshlflags
);
hres
=
marshal_object
(
apt
,
&
stdobjref
,
riid
,
pv
,
dest_context
,
dest_context_data
,
mshlflags
);
if
(
hres
!=
S_OK
)
if
(
hres
!=
S_OK
)
{
{
ERR
(
"Failed to create ifstub, hres=0x%x
\n
"
,
hres
);
ERR
(
"Failed to create ifstub, hres=0x%x
\n
"
,
hres
);
...
...
dlls/ole32/rpc.c
View file @
0b5c0855
...
@@ -1052,10 +1052,8 @@ static HRESULT WINAPI ServerRpcChannelBuffer_GetDestCtx(LPRPCCHANNELBUFFER iface
...
@@ -1052,10 +1052,8 @@ static HRESULT WINAPI ServerRpcChannelBuffer_GetDestCtx(LPRPCCHANNELBUFFER iface
{
{
RpcChannelBuffer
*
This
=
(
RpcChannelBuffer
*
)
iface
;
RpcChannelBuffer
*
This
=
(
RpcChannelBuffer
*
)
iface
;
WARN
(
"(%p,%p), stub!
\n
"
,
dest_context
,
dest_context_data
);
TRACE
(
"(%p,%p)
\n
"
,
dest_context
,
dest_context_data
);
/* FIXME: implement this by storing the dwDestContext and pvDestContext
* values passed into IMarshal_MarshalInterface and returning them here */
*
dest_context
=
This
->
dest_context
;
*
dest_context
=
This
->
dest_context
;
*
dest_context_data
=
This
->
dest_context_data
;
*
dest_context_data
=
This
->
dest_context_data
;
return
S_OK
;
return
S_OK
;
...
@@ -1159,7 +1157,7 @@ HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid,
...
@@ -1159,7 +1157,7 @@ HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid,
return
S_OK
;
return
S_OK
;
}
}
HRESULT
RPC_CreateServerChannel
(
IRpcChannelBuffer
**
chan
)
HRESULT
RPC_CreateServerChannel
(
DWORD
dest_context
,
void
*
dest_context_data
,
IRpcChannelBuffer
**
chan
)
{
{
RpcChannelBuffer
*
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
RpcChannelBuffer
*
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
if
(
!
This
)
if
(
!
This
)
...
@@ -1167,8 +1165,8 @@ HRESULT RPC_CreateServerChannel(IRpcChannelBuffer **chan)
...
@@ -1167,8 +1165,8 @@ HRESULT RPC_CreateServerChannel(IRpcChannelBuffer **chan)
This
->
IRpcChannelBuffer_iface
.
lpVtbl
=
&
ServerRpcChannelBufferVtbl
;
This
->
IRpcChannelBuffer_iface
.
lpVtbl
=
&
ServerRpcChannelBufferVtbl
;
This
->
refs
=
1
;
This
->
refs
=
1
;
This
->
dest_context
=
MSHCTX_DIFFERENTMACHINE
;
This
->
dest_context
=
dest_context
;
This
->
dest_context_data
=
NULL
;
This
->
dest_context_data
=
dest_context_data
;
*
chan
=
&
This
->
IRpcChannelBuffer_iface
;
*
chan
=
&
This
->
IRpcChannelBuffer_iface
;
...
...
dlls/ole32/stubmanager.c
View file @
0b5c0855
...
@@ -67,7 +67,8 @@ static inline HRESULT generate_ipid(struct stub_manager *m, IPID *ipid)
...
@@ -67,7 +67,8 @@ static inline HRESULT generate_ipid(struct stub_manager *m, IPID *ipid)
}
}
/* registers a new interface stub COM object with the stub manager and returns registration record */
/* registers a new interface stub COM object with the stub manager and returns registration record */
struct
ifstub
*
stub_manager_new_ifstub
(
struct
stub_manager
*
m
,
IRpcStubBuffer
*
sb
,
IUnknown
*
iptr
,
REFIID
iid
,
MSHLFLAGS
flags
)
struct
ifstub
*
stub_manager_new_ifstub
(
struct
stub_manager
*
m
,
IRpcStubBuffer
*
sb
,
IUnknown
*
iptr
,
REFIID
iid
,
DWORD
dest_context
,
void
*
dest_context_data
,
MSHLFLAGS
flags
)
{
{
struct
ifstub
*
stub
;
struct
ifstub
*
stub
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -78,7 +79,7 @@ struct ifstub *stub_manager_new_ifstub(struct stub_manager *m, IRpcStubBuffer *s
...
@@ -78,7 +79,7 @@ struct ifstub *stub_manager_new_ifstub(struct stub_manager *m, IRpcStubBuffer *s
stub
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
ifstub
));
stub
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
ifstub
));
if
(
!
stub
)
return
NULL
;
if
(
!
stub
)
return
NULL
;
hr
=
RPC_CreateServerChannel
(
&
stub
->
chan
);
hr
=
RPC_CreateServerChannel
(
dest_context
,
dest_context_data
,
&
stub
->
chan
);
if
(
hr
!=
S_OK
)
if
(
hr
!=
S_OK
)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
stub
);
HeapFree
(
GetProcessHeap
(),
0
,
stub
);
...
@@ -666,7 +667,7 @@ static HRESULT WINAPI RemUnknown_RemQueryInterface(IRemUnknown *iface,
...
@@ -666,7 +667,7 @@ static HRESULT WINAPI RemUnknown_RemQueryInterface(IRemUnknown *iface,
for
(
i
=
0
;
i
<
cIids
;
i
++
)
for
(
i
=
0
;
i
<
cIids
;
i
++
)
{
{
HRESULT
hrobj
=
marshal_object
(
apt
,
&
(
*
ppQIResults
)[
i
].
std
,
&
iids
[
i
],
HRESULT
hrobj
=
marshal_object
(
apt
,
&
(
*
ppQIResults
)[
i
].
std
,
&
iids
[
i
],
stubmgr
->
object
,
MSHLFLAGS_NORMAL
);
stubmgr
->
object
,
MSH
CTX_DIFFERENTMACHINE
,
NULL
,
MSH
LFLAGS_NORMAL
);
if
(
hrobj
==
S_OK
)
if
(
hrobj
==
S_OK
)
successful_qis
++
;
successful_qis
++
;
(
*
ppQIResults
)[
i
].
hResult
=
hrobj
;
(
*
ppQIResults
)[
i
].
hResult
=
hrobj
;
...
@@ -775,7 +776,7 @@ HRESULT start_apartment_remote_unknown(void)
...
@@ -775,7 +776,7 @@ HRESULT start_apartment_remote_unknown(void)
{
{
STDOBJREF
stdobjref
;
/* dummy - not used */
STDOBJREF
stdobjref
;
/* dummy - not used */
/* register it with the stub manager */
/* register it with the stub manager */
hr
=
marshal_object
(
apt
,
&
stdobjref
,
&
IID_IRemUnknown
,
(
IUnknown
*
)
pRemUnknown
,
MSHLFLAGS_NORMAL
|
MSHLFLAGSP_REMUNKNOWN
);
hr
=
marshal_object
(
apt
,
&
stdobjref
,
&
IID_IRemUnknown
,
(
IUnknown
*
)
pRemUnknown
,
MSH
CTX_DIFFERENTMACHINE
,
NULL
,
MSH
LFLAGS_NORMAL
|
MSHLFLAGSP_REMUNKNOWN
);
/* release our reference to the object as the stub manager will manage the life cycle for us */
/* release our reference to the object as the stub manager will manage the life cycle for us */
IRemUnknown_Release
(
pRemUnknown
);
IRemUnknown_Release
(
pRemUnknown
);
if
(
hr
==
S_OK
)
if
(
hr
==
S_OK
)
...
...
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