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
62837102
Commit
62837102
authored
Jun 30, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jun 30, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: When CoLockObjectExternal with fLock=TRUE is used on an object
that hasn't yet been marshaled then it should create a new stub manager.
parent
2fa3cc03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletion
+35
-1
compobj.c
dlls/ole32/compobj.c
+16
-0
marshal.c
dlls/ole32/tests/marshal.c
+19
-1
No files found.
dlls/ole32/compobj.c
View file @
62837102
...
...
@@ -2098,6 +2098,10 @@ static void COM_RevokeAllClasses()
* RETURNS
* Success: S_OK.
* Failure: HRESULT code.
*
* NOTES
* If fLock is TRUE and an object is passed in that doesn't have a stub
* manager then a new stub manager is created for the object.
*/
HRESULT
WINAPI
CoLockObjectExternal
(
LPUNKNOWN
pUnk
,
...
...
@@ -2126,6 +2130,18 @@ HRESULT WINAPI CoLockObjectExternal(
return
S_OK
;
}
else
if
(
fLock
)
{
stubmgr
=
new_stub_manager
(
apt
,
pUnk
);
if
(
stubmgr
)
{
stub_manager_ext_addref
(
stubmgr
,
1
);
stub_manager_int_release
(
stubmgr
);
}
return
S_OK
;
}
else
{
WARN
(
"stub object not found %p
\n
"
,
pUnk
);
...
...
dlls/ole32/tests/marshal.c
View file @
62837102
...
...
@@ -998,6 +998,20 @@ static void test_lock_object_external(void)
cLocks
=
0
;
/* test the stub manager creation aspect of CoLockObjectExternal when the
* object hasn't been marshaled yet */
CoLockObjectExternal
((
IUnknown
*
)
&
Test_ClassFactory
,
TRUE
,
TRUE
);
ok_more_than_one_lock
();
CoDisconnectObject
((
IUnknown
*
)
&
Test_ClassFactory
,
0
);
ok_no_locks
();
/* test our empty stub manager being handled correctly in
* CoMarshalInterface */
CoLockObjectExternal
((
IUnknown
*
)
&
Test_ClassFactory
,
TRUE
,
TRUE
);
hr
=
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
pStream
);
ok_ole_success
(
hr
,
CreateStreamOnHGlobal
);
hr
=
CoMarshalInterface
(
pStream
,
&
IID_IClassFactory
,
(
IUnknown
*
)
&
Test_ClassFactory
,
MSHCTX_INPROC
,
NULL
,
MSHLFLAGS_NORMAL
);
...
...
@@ -1006,7 +1020,7 @@ static void test_lock_object_external(void)
CoLockObjectExternal
((
IUnknown
*
)
&
Test_ClassFactory
,
TRUE
,
TRUE
);
ok_more_than_one_lock
();
IStream_Seek
(
pStream
,
ullZero
,
STREAM_SEEK_SET
,
NULL
);
hr
=
CoReleaseMarshalData
(
pStream
);
ok_ole_success
(
hr
,
CoReleaseMarshalData
);
...
...
@@ -1016,6 +1030,10 @@ static void test_lock_object_external(void)
CoLockObjectExternal
((
IUnknown
*
)
&
Test_ClassFactory
,
FALSE
,
TRUE
);
ok_more_than_one_lock
();
CoLockObjectExternal
((
IUnknown
*
)
&
Test_ClassFactory
,
FALSE
,
TRUE
);
ok_no_locks
();
}
...
...
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