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
4cbca9ac
Commit
4cbca9ac
authored
May 07, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
May 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add test for registered class becoming invalid when apartment is destroyed.
parent
af2c3496
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
compobj.c
dlls/ole32/tests/compobj.c
+17
-0
No files found.
dlls/ole32/tests/compobj.c
View file @
4cbca9ac
...
...
@@ -651,6 +651,7 @@ static void test_CoRegisterClassObject(void)
};
/* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */
DWORD
cookie
;
HRESULT
hr
;
IClassFactory
*
pcf
;
pCoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
...
...
@@ -699,6 +700,22 @@ static void test_CoRegisterClassObject(void)
hr
=
CoRevokeClassObject
(
cookie
);
ok_ole_success
(
hr
,
"CoRevokeClassObject"
);
/* test whether registered class becomes invalid when apartment is destroyed */
hr
=
CoRegisterClassObject
(
&
CLSID_WineOOPTest
,
(
IUnknown
*
)
&
Test_ClassFactory
,
CLSCTX_INPROC_SERVER
,
REGCLS_SINGLEUSE
,
&
cookie
);
ok_ole_success
(
hr
,
"CoRegisterClassObject"
);
CoUninitialize
();
pCoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
hr
=
CoGetClassObject
(
&
CLSID_WineOOPTest
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IClassFactory
,
(
void
**
)
&
pcf
);
ok
(
hr
==
REGDB_E_CLASSNOTREG
,
"object registered in an apartment shouldn't accessible after it is destroyed
\n
"
);
/* crashes with at least win9x DCOM! */
if
(
0
)
hr
=
CoRevokeClassObject
(
cookie
);
CoUninitialize
();
}
...
...
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