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
f4f05ff9
Commit
f4f05ff9
authored
Dec 05, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Use an iface instead of a vtbl pointer in TMarshalDispatchChannel.
parent
3ef0a523
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
tmarshal.c
dlls/oleaut32/tmarshal.c
+16
-11
No files found.
dlls/oleaut32/tmarshal.c
View file @
f4f05ff9
...
...
@@ -1526,13 +1526,18 @@ static HRESULT WINAPI ProxyIDispatch_Invoke(LPDISPATCH iface, DISPID dispIdMembe
typedef
struct
{
const
IRpcChannelBufferVtbl
*
lpVtbl
;
IRpcChannelBuffer
IRpcChannelBuffer_iface
;
LONG
refs
;
/* the IDispatch-derived interface we are handling */
IID
tmarshal_iid
;
IID
tmarshal_iid
;
IRpcChannelBuffer
*
pDelegateChannel
;
}
TMarshalDispatchChannel
;
static
inline
TMarshalDispatchChannel
*
impl_from_IRpcChannelBuffer
(
IRpcChannelBuffer
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
TMarshalDispatchChannel
,
IRpcChannelBuffer_iface
);
}
static
HRESULT
WINAPI
TMarshalDispatchChannel_QueryInterface
(
LPRPCCHANNELBUFFER
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
*
ppv
=
NULL
;
...
...
@@ -1547,13 +1552,13 @@ static HRESULT WINAPI TMarshalDispatchChannel_QueryInterface(LPRPCCHANNELBUFFER
static
ULONG
WINAPI
TMarshalDispatchChannel_AddRef
(
LPRPCCHANNELBUFFER
iface
)
{
TMarshalDispatchChannel
*
This
=
(
TMarshalDispatchChannel
*
)
iface
;
TMarshalDispatchChannel
*
This
=
impl_from_IRpcChannelBuffer
(
iface
)
;
return
InterlockedIncrement
(
&
This
->
refs
);
}
static
ULONG
WINAPI
TMarshalDispatchChannel_Release
(
LPRPCCHANNELBUFFER
iface
)
{
TMarshalDispatchChannel
*
This
=
(
TMarshalDispatchChannel
*
)
iface
;
TMarshalDispatchChannel
*
This
=
impl_from_IRpcChannelBuffer
(
iface
)
;
ULONG
ref
;
ref
=
InterlockedDecrement
(
&
This
->
refs
);
...
...
@@ -1567,7 +1572,7 @@ static ULONG WINAPI TMarshalDispatchChannel_Release(LPRPCCHANNELBUFFER iface)
static
HRESULT
WINAPI
TMarshalDispatchChannel_GetBuffer
(
LPRPCCHANNELBUFFER
iface
,
RPCOLEMESSAGE
*
olemsg
,
REFIID
riid
)
{
TMarshalDispatchChannel
*
This
=
(
TMarshalDispatchChannel
*
)
iface
;
TMarshalDispatchChannel
*
This
=
impl_from_IRpcChannelBuffer
(
iface
)
;
TRACE
(
"(%p, %s)
\n
"
,
olemsg
,
debugstr_guid
(
riid
));
/* Note: we are pretending to invoke a method on the interface identified
* by tmarshal_iid so that we can re-use the IDispatch proxy/stub code
...
...
@@ -1577,28 +1582,28 @@ static HRESULT WINAPI TMarshalDispatchChannel_GetBuffer(LPRPCCHANNELBUFFER iface
static
HRESULT
WINAPI
TMarshalDispatchChannel_SendReceive
(
LPRPCCHANNELBUFFER
iface
,
RPCOLEMESSAGE
*
olemsg
,
ULONG
*
pstatus
)
{
TMarshalDispatchChannel
*
This
=
(
TMarshalDispatchChannel
*
)
iface
;
TMarshalDispatchChannel
*
This
=
impl_from_IRpcChannelBuffer
(
iface
)
;
TRACE
(
"(%p, %p)
\n
"
,
olemsg
,
pstatus
);
return
IRpcChannelBuffer_SendReceive
(
This
->
pDelegateChannel
,
olemsg
,
pstatus
);
}
static
HRESULT
WINAPI
TMarshalDispatchChannel_FreeBuffer
(
LPRPCCHANNELBUFFER
iface
,
RPCOLEMESSAGE
*
olemsg
)
{
TMarshalDispatchChannel
*
This
=
(
TMarshalDispatchChannel
*
)
iface
;
TMarshalDispatchChannel
*
This
=
impl_from_IRpcChannelBuffer
(
iface
)
;
TRACE
(
"(%p)
\n
"
,
olemsg
);
return
IRpcChannelBuffer_FreeBuffer
(
This
->
pDelegateChannel
,
olemsg
);
}
static
HRESULT
WINAPI
TMarshalDispatchChannel_GetDestCtx
(
LPRPCCHANNELBUFFER
iface
,
DWORD
*
pdwDestContext
,
void
**
ppvDestContext
)
{
TMarshalDispatchChannel
*
This
=
(
TMarshalDispatchChannel
*
)
iface
;
TMarshalDispatchChannel
*
This
=
impl_from_IRpcChannelBuffer
(
iface
)
;
TRACE
(
"(%p,%p)
\n
"
,
pdwDestContext
,
ppvDestContext
);
return
IRpcChannelBuffer_GetDestCtx
(
This
->
pDelegateChannel
,
pdwDestContext
,
ppvDestContext
);
}
static
HRESULT
WINAPI
TMarshalDispatchChannel_IsConnected
(
LPRPCCHANNELBUFFER
iface
)
{
TMarshalDispatchChannel
*
This
=
(
TMarshalDispatchChannel
*
)
iface
;
TMarshalDispatchChannel
*
This
=
impl_from_IRpcChannelBuffer
(
iface
)
;
TRACE
(
"()
\n
"
);
return
IRpcChannelBuffer_IsConnected
(
This
->
pDelegateChannel
);
}
...
...
@@ -1623,13 +1628,13 @@ static HRESULT TMarshalDispatchChannel_Create(
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
TMarshalDispatchChannelVtbl
;
This
->
IRpcChannelBuffer_iface
.
lpVtbl
=
&
TMarshalDispatchChannelVtbl
;
This
->
refs
=
1
;
IRpcChannelBuffer_AddRef
(
pDelegateChannel
);
This
->
pDelegateChannel
=
pDelegateChannel
;
This
->
tmarshal_iid
=
*
tmarshal_riid
;
*
ppChannel
=
(
IRpcChannelBuffer
*
)
&
This
->
lpVtbl
;
*
ppChannel
=
&
This
->
IRpcChannelBuffer_iface
;
return
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