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
3270bb1e
Commit
3270bb1e
authored
May 29, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
May 29, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed CoMarshalInterThreadInterfaceInStream and
CoGetInterfaceAndReleaseStream.
parent
c01570cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
28 deletions
+51
-28
marshal.c
dlls/ole32/marshal.c
+51
-28
No files found.
dlls/ole32/marshal.c
View file @
3270bb1e
...
@@ -596,45 +596,68 @@ CoReleaseMarshalData(IStream *pStm) {
...
@@ -596,45 +596,68 @@ CoReleaseMarshalData(IStream *pStm) {
/***********************************************************************
/***********************************************************************
* CoMarshalInterThreadInterfaceInStream [OLE32.@]
* CoMarshalInterThreadInterfaceInStream [OLE32.@]
*
*
* Marshal interfaces across threads. We don't have a thread distinction,
* Marshal an interface across threads in the same process.
* meaning most interfaces just work across different threads, the RPC
*
* handles it.
* PARAMS
* riid [I] Identifier of the interface to be marshalled.
* pUnk [I] Pointer to IUnknown-derived interface that will be marshalled.
* ppStm [O] Pointer to IStream object that is created and then used to store the marshalled inteface.
*
* RETURNS
* Success: S_OK
* Failure: E_OUTOFMEMORY and other COM error codes
*
* SEE
* CoMarshalInterface(), CoUnmarshalInterface() and CoGetInterfaceAndReleaseStream()
*/
*/
HRESULT
WINAPI
HRESULT
WINAPI
CoMarshalInterThreadInterfaceInStream
(
CoMarshalInterThreadInterfaceInStream
(
REFIID
riid
,
LPUNKNOWN
pUnk
,
LPSTREAM
*
ppStm
REFIID
riid
,
LPUNKNOWN
pUnk
,
LPSTREAM
*
ppStm
)
)
{
{
ULONG
res
;
ULARGE_INTEGER
xpos
;
ULARGE_INTEGER
xpos
;
LARGE_INTEGER
seekto
;
LARGE_INTEGER
seekto
;
HRESULT
hres
;
HRESULT
hres
;
TRACE
(
"(%s, %p, %p)
\n
"
,
debugstr_guid
(
riid
),
pUnk
,
ppStm
);
TRACE
(
"(%s, %p, %p)
\n
"
,
debugstr_guid
(
riid
),
pUnk
,
ppStm
);
hres
=
CreateStreamOnHGlobal
(
0
,
TRUE
,
ppStm
);
if
(
hres
)
return
hres
;
hres
=
CreateStreamOnHGlobal
(
0
,
TRUE
,
ppStm
);
/* CoMarshalInterface(...); */
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IStream_Write
(
*
ppStm
,
&
pUnk
,
sizeof
(
LPUNKNOWN
),
&
res
);
hres
=
CoMarshalInterface
(
*
ppStm
,
riid
,
pUnk
,
MSHCTX_INPROC
,
NULL
,
MSHLFLAGS_NORMAL
);
if
(
hres
)
return
hres
;
memset
(
&
seekto
,
0
,
sizeof
(
seekto
));
/* FIXME: is this needed? */
IStream_Seek
(
*
ppStm
,
seekto
,
SEEK_SET
,
&
xpos
);
memset
(
&
seekto
,
0
,
sizeof
(
seekto
));
return
S_OK
;
IStream_Seek
(
*
ppStm
,
seekto
,
SEEK_SET
,
&
xpos
);
return
hres
;
}
}
/***********************************************************************
/***********************************************************************
* CoGetInterfaceAndReleaseStream [OLE32.@]
* CoGetInterfaceAndReleaseStream [OLE32.@]
*
* Unmarshalls an inteface from a stream and then releases the stream.
*
* PARAMS
* pStm [I] Stream that contains the marshalled inteface.
* riid [I] Interface identifier of the object to unmarshall.
* ppv [O] Address of pointer where the requested interface object will be stored.
*
* RETURNS
* Success: S_OK
* Failure: A COM error code
*
* SEE
* CoMarshalInterThreadInterfaceInStream() and CoUnmarshalInteface()
*/
*/
HRESULT
WINAPI
HRESULT
WINAPI
CoGetInterfaceAndReleaseStream
(
LPSTREAM
pStm
,
REFIID
riid
,
LPVOID
*
ppv
)
{
CoGetInterfaceAndReleaseStream
(
LPSTREAM
pStm
,
REFIID
riid
,
LPVOID
*
ppv
)
ULONG
res
;
{
HRESULT
hres
;
HRESULT
hres
;
LPUNKNOWN
pUnk
;
TRACE
(
"(,%s,)
\n
"
,
debugstr_guid
(
riid
));
TRACE
(
"(%p, %s, %p)
\n
"
,
pStm
,
debugstr_guid
(
riid
),
ppv
);
/* CoUnmarshalInterface(...); */
hres
=
IStream_Read
(
pStm
,
&
pUnk
,
sizeof
(
LPUNKNOWN
),
&
res
);
hres
=
CoUnmarshalInterface
(
pStm
,
riid
,
ppv
);
if
(
hres
)
return
hres
;
IStream_Release
(
pStm
);
IStream_Release
(
pStm
);
return
hres
;
return
IUnknown_QueryInterface
(
pUnk
,
riid
,
ppv
);
}
}
static
HRESULT
WINAPI
static
HRESULT
WINAPI
...
...
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