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
54bf3857
Commit
54bf3857
authored
Nov 11, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Get rid of the ICOM_THIS_MULTI macro.
parent
6682d86e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
30 deletions
+38
-30
compobj_private.h
dlls/ole32/compobj_private.h
+0
-23
marshal.c
dlls/ole32/marshal.c
+38
-7
No files found.
dlls/ole32/compobj_private.h
View file @
54bf3857
...
...
@@ -120,27 +120,6 @@ struct ifproxy
IRpcChannelBuffer
*
chan
;
/* channel to object (CS parent->cs) */
};
/* imported object / proxy manager */
struct
proxy_manager
{
const
IMultiQIVtbl
*
lpVtbl
;
const
IMarshalVtbl
*
lpVtblMarshal
;
const
IClientSecurityVtbl
*
lpVtblCliSec
;
struct
apartment
*
parent
;
/* owning apartment (RO) */
struct
list
entry
;
/* entry in apartment (CS parent->cs) */
OXID
oxid
;
/* object exported ID (RO) */
OXID_INFO
oxid_info
;
/* string binding, ipid of rem unknown and other information (RO) */
OID
oid
;
/* object ID (RO) */
struct
list
interfaces
;
/* imported interfaces (CS cs) */
LONG
refs
;
/* proxy reference count (LOCK) */
CRITICAL_SECTION
cs
;
/* thread safety for this object and children */
ULONG
sorflags
;
/* STDOBJREF flags (RO) */
IRemUnknown
*
remunk
;
/* proxy to IRemUnknown used for lifecycle management (CS cs) */
HANDLE
remoting_mutex
;
/* mutex used for synchronizing access to IRemUnknown */
MSHCTX
dest_context
;
/* context used for activating optimisations (LOCK) */
void
*
dest_context_data
;
/* reserved context value (LOCK) */
};
struct
apartment
{
struct
list
entry
;
...
...
@@ -297,8 +276,6 @@ static inline GUID COM_CurrentCausalityId(void)
return
info
->
causality_id
;
}
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
/* helpers for debugging */
# define DEBUG_SET_CRITSEC_NAME(cs, name) (cs)->DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": " name)
# define DEBUG_CLEAR_CRITSEC_NAME(cs) (cs)->DebugInfo->Spare[0] = 0
...
...
dlls/ole32/marshal.c
View file @
54bf3857
...
...
@@ -52,6 +52,37 @@ extern const CLSID CLSID_DfMarshal;
* when the proxy disconnects or is destroyed */
#define SORFP_NOLIFETIMEMGMT SORF_OXRES2
/* imported object / proxy manager */
struct
proxy_manager
{
const
IMultiQIVtbl
*
lpVtbl
;
const
IMarshalVtbl
*
lpVtblMarshal
;
const
IClientSecurityVtbl
*
lpVtblCliSec
;
struct
apartment
*
parent
;
/* owning apartment (RO) */
struct
list
entry
;
/* entry in apartment (CS parent->cs) */
OXID
oxid
;
/* object exported ID (RO) */
OXID_INFO
oxid_info
;
/* string binding, ipid of rem unknown and other information (RO) */
OID
oid
;
/* object ID (RO) */
struct
list
interfaces
;
/* imported interfaces (CS cs) */
LONG
refs
;
/* proxy reference count (LOCK) */
CRITICAL_SECTION
cs
;
/* thread safety for this object and children */
ULONG
sorflags
;
/* STDOBJREF flags (RO) */
IRemUnknown
*
remunk
;
/* proxy to IRemUnknown used for lifecycle management (CS cs) */
HANDLE
remoting_mutex
;
/* mutex used for synchronizing access to IRemUnknown */
MSHCTX
dest_context
;
/* context used for activating optimisations (LOCK) */
void
*
dest_context_data
;
/* reserved context value (LOCK) */
};
static
inline
struct
proxy_manager
*
impl_from_IMarshal
(
IMarshal
*
iface
)
{
return
(
struct
proxy_manager
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
struct
proxy_manager
,
lpVtblMarshal
));
}
static
inline
struct
proxy_manager
*
impl_from_IClientSecurity
(
IClientSecurity
*
iface
)
{
return
(
struct
proxy_manager
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
struct
proxy_manager
,
lpVtblCliSec
));
}
static
HRESULT
unmarshal_object
(
const
STDOBJREF
*
stdobjref
,
APARTMENT
*
apt
,
MSHCTX
dest_context
,
void
*
dest_context_data
,
REFIID
riid
,
const
OXID_INFO
*
oxid_info
,
...
...
@@ -352,19 +383,19 @@ static HRESULT WINAPI StdMarshalImpl_DisconnectObject(LPMARSHAL iface, DWORD dwR
static
HRESULT
WINAPI
Proxy_QueryInterface
(
IMarshal
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
ICOM_THIS_MULTI
(
struct
proxy_manager
,
lpVtblMarshal
,
iface
);
struct
proxy_manager
*
This
=
impl_from_IMarshal
(
iface
);
return
IMultiQI_QueryInterface
((
IMultiQI
*
)
&
This
->
lpVtbl
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
Proxy_AddRef
(
IMarshal
*
iface
)
{
ICOM_THIS_MULTI
(
struct
proxy_manager
,
lpVtblMarshal
,
iface
);
struct
proxy_manager
*
This
=
impl_from_IMarshal
(
iface
);
return
IMultiQI_AddRef
((
IMultiQI
*
)
&
This
->
lpVtbl
);
}
static
ULONG
WINAPI
Proxy_Release
(
IMarshal
*
iface
)
{
ICOM_THIS_MULTI
(
struct
proxy_manager
,
lpVtblMarshal
,
iface
);
struct
proxy_manager
*
This
=
impl_from_IMarshal
(
iface
);
return
IMultiQI_Release
((
IMultiQI
*
)
&
This
->
lpVtbl
);
}
...
...
@@ -372,7 +403,7 @@ static HRESULT WINAPI Proxy_MarshalInterface(
LPMARSHAL
iface
,
IStream
*
pStm
,
REFIID
riid
,
void
*
pv
,
DWORD
dwDestContext
,
void
*
pvDestContext
,
DWORD
mshlflags
)
{
ICOM_THIS_MULTI
(
struct
proxy_manager
,
lpVtblMarshal
,
iface
);
struct
proxy_manager
*
This
=
impl_from_IMarshal
(
iface
);
HRESULT
hr
;
struct
ifproxy
*
ifproxy
;
...
...
@@ -497,19 +528,19 @@ static const IMarshalVtbl ProxyMarshal_Vtbl =
static
HRESULT
WINAPI
ProxyCliSec_QueryInterface
(
IClientSecurity
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
ICOM_THIS_MULTI
(
struct
proxy_manager
,
lpVtblCliSec
,
iface
);
struct
proxy_manager
*
This
=
impl_from_IClientSecurity
(
iface
);
return
IMultiQI_QueryInterface
((
IMultiQI
*
)
&
This
->
lpVtbl
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
ProxyCliSec_AddRef
(
IClientSecurity
*
iface
)
{
ICOM_THIS_MULTI
(
struct
proxy_manager
,
lpVtblCliSec
,
iface
);
struct
proxy_manager
*
This
=
impl_from_IClientSecurity
(
iface
);
return
IMultiQI_AddRef
((
IMultiQI
*
)
&
This
->
lpVtbl
);
}
static
ULONG
WINAPI
ProxyCliSec_Release
(
IClientSecurity
*
iface
)
{
ICOM_THIS_MULTI
(
struct
proxy_manager
,
lpVtblCliSec
,
iface
);
struct
proxy_manager
*
This
=
impl_from_IClientSecurity
(
iface
);
return
IMultiQI_Release
((
IMultiQI
*
)
&
This
->
lpVtbl
);
}
...
...
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