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
2c57189a
Commit
2c57189a
authored
May 24, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
May 25, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Implement table-strong marshaling and ReleaseMarshalData for the free-threaded marshaler.
parent
f9b5280d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
6 deletions
+42
-6
ftmarshal.c
dlls/ole32/ftmarshal.c
+39
-3
marshal.c
dlls/ole32/tests/marshal.c
+3
-3
No files found.
dlls/ole32/ftmarshal.c
View file @
2c57189a
...
...
@@ -262,7 +262,7 @@ FTMarshalImpl_UnmarshalInterface (LPMARSHAL iface, IStream * pStm, REFIID riid,
if
(
hres
!=
S_OK
)
return
STG_E_READFAULT
;
hres
=
IUnknown_QueryInterface
(
object
,
riid
,
ppv
);
if
(
!
(
mshlflags
&
MSHLFLAGS_TABLEWEAK
))
if
(
!
(
mshlflags
&
(
MSHLFLAGS_TABLEWEAK
|
MSHLFLAGS_TABLESTRONG
)
))
IUnknown_Release
(
object
);
return
hres
;
}
...
...
@@ -270,13 +270,49 @@ FTMarshalImpl_UnmarshalInterface (LPMARSHAL iface, IStream * pStm, REFIID riid,
static
HRESULT
WINAPI
FTMarshalImpl_ReleaseMarshalData
(
LPMARSHAL
iface
,
IStream
*
pStm
)
{
FIXME
(
"(), stub!
\n
"
);
DWORD
mshlflags
;
HRESULT
hres
;
TRACE
(
"(%p)
\n
"
,
pStm
);
hres
=
IStream_Read
(
pStm
,
&
mshlflags
,
sizeof
(
mshlflags
),
NULL
);
if
(
hres
!=
S_OK
)
return
STG_E_READFAULT
;
if
(
mshlflags
==
0x57dfd54d
/* MEOW */
)
{
IMarshal
*
pMarshal
;
hres
=
CoCreateInstance
(
&
CLSID_DfMarshal
,
NULL
,
CLSCTX_INPROC
,
&
IID_IMarshal
,
(
void
**
)
&
pMarshal
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IMarshal_ReleaseMarshalData
(
pMarshal
,
pStm
);
IMarshal_Release
(
pMarshal
);
return
hres
;
}
else
{
IUnknown
*
object
;
DWORD
constant
;
GUID
unknown_guid
;
hres
=
IStream_Read
(
pStm
,
&
object
,
sizeof
(
object
),
NULL
);
if
(
hres
!=
S_OK
)
return
STG_E_READFAULT
;
hres
=
IStream_Read
(
pStm
,
&
constant
,
sizeof
(
constant
),
NULL
);
if
(
hres
!=
S_OK
)
return
STG_E_READFAULT
;
if
(
constant
!=
0
)
FIXME
(
"constant is 0x%lx instead of 0
\n
"
,
constant
);
hres
=
IStream_Read
(
pStm
,
&
unknown_guid
,
sizeof
(
unknown_guid
),
NULL
);
if
(
hres
!=
S_OK
)
return
STG_E_READFAULT
;
IUnknown_Release
(
object
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
FTMarshalImpl_DisconnectObject
(
LPMARSHAL
iface
,
DWORD
dwReserved
)
{
FIXME
(
"(), stub!
\n
"
);
TRACE
(
"()
\n
"
);
/* nothing to do */
return
S_OK
;
}
...
...
dlls/ole32/tests/marshal.c
View file @
2c57189a
...
...
@@ -1718,7 +1718,7 @@ static void test_freethreadedmarshaler(void)
IUnknown_Release
(
pProxy
);
todo_wine
ok_more_than_one_lock
();
ok_more_than_one_lock
();
IStream_Seek
(
pStream
,
llZero
,
STREAM_SEEK_SET
,
NULL
);
hr
=
IMarshal_ReleaseMarshalData
(
pFTMarshal
,
pStream
);
...
...
@@ -1767,7 +1767,7 @@ static void test_freethreadedmarshaler(void)
hr
=
IMarshal_ReleaseMarshalData
(
pFTMarshal
,
pStream
);
ok_ole_success
(
hr
,
IMarshal_ReleaseMarshalData
);
todo_wine
ok_no_locks
();
ok_no_locks
();
/* doesn't enforce marshaling rules here and allows us to unmarshal the
* interface, even though it was freed above */
...
...
@@ -1775,7 +1775,7 @@ static void test_freethreadedmarshaler(void)
hr
=
IMarshal_UnmarshalInterface
(
pFTMarshal
,
pStream
,
&
IID_IUnknown
,
(
void
**
)
&
pProxy
);
ok_ole_success
(
hr
,
IMarshal_UnmarshalInterface
);
todo_wine
ok_no_locks
();
ok_no_locks
();
IStream_Release
(
pStream
);
IMarshal_Release
(
pFTMarshal
);
...
...
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