Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7ba4b816
Commit
7ba4b816
authored
Mar 09, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add some tests for the flags input to CoRegisterClassObject.
parent
880542a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
compobj.c
dlls/ole32/tests/compobj.c
+62
-0
No files found.
dlls/ole32/tests/compobj.c
View file @
7ba4b816
...
...
@@ -640,6 +640,67 @@ static void test_CoMarshalInterThreadInterfaceInStream(void)
CoUninitialize
();
}
static
void
test_CoRegisterClassObject
(
void
)
{
static
const
CLSID
CLSID_WineOOPTest
=
{
0x5201163f
,
0x8164
,
0x4fd0
,
{
0xa1
,
0xa2
,
0x5d
,
0x5a
,
0x36
,
0x54
,
0xd3
,
0xbd
}
};
/* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */
DWORD
cookie
;
HRESULT
hr
;
pCoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
/* CLSCTX_INPROC_SERVER */
hr
=
CoRegisterClassObject
(
&
CLSID_WineOOPTest
,
(
IUnknown
*
)
&
Test_ClassFactory
,
CLSCTX_INPROC_SERVER
,
REGCLS_SINGLEUSE
,
&
cookie
);
ok_ole_success
(
hr
,
"CoRegisterClassObject"
);
hr
=
CoRevokeClassObject
(
cookie
);
ok_ole_success
(
hr
,
"CoRevokeClassObject"
);
hr
=
CoRegisterClassObject
(
&
CLSID_WineOOPTest
,
(
IUnknown
*
)
&
Test_ClassFactory
,
CLSCTX_INPROC_SERVER
,
REGCLS_MULTIPLEUSE
,
&
cookie
);
ok_ole_success
(
hr
,
"CoRegisterClassObject"
);
hr
=
CoRevokeClassObject
(
cookie
);
ok_ole_success
(
hr
,
"CoRevokeClassObject"
);
hr
=
CoRegisterClassObject
(
&
CLSID_WineOOPTest
,
(
IUnknown
*
)
&
Test_ClassFactory
,
CLSCTX_INPROC_SERVER
,
REGCLS_MULTI_SEPARATE
,
&
cookie
);
ok_ole_success
(
hr
,
"CoRegisterClassObject"
);
hr
=
CoRevokeClassObject
(
cookie
);
ok_ole_success
(
hr
,
"CoRevokeClassObject"
);
/* CLSCTX_LOCAL_SERVER */
hr
=
CoRegisterClassObject
(
&
CLSID_WineOOPTest
,
(
IUnknown
*
)
&
Test_ClassFactory
,
CLSCTX_LOCAL_SERVER
,
REGCLS_SINGLEUSE
,
&
cookie
);
ok_ole_success
(
hr
,
"CoRegisterClassObject"
);
hr
=
CoRevokeClassObject
(
cookie
);
ok_ole_success
(
hr
,
"CoRevokeClassObject"
);
hr
=
CoRegisterClassObject
(
&
CLSID_WineOOPTest
,
(
IUnknown
*
)
&
Test_ClassFactory
,
CLSCTX_LOCAL_SERVER
,
REGCLS_MULTIPLEUSE
,
&
cookie
);
ok_ole_success
(
hr
,
"CoRegisterClassObject"
);
hr
=
CoRevokeClassObject
(
cookie
);
ok_ole_success
(
hr
,
"CoRevokeClassObject"
);
hr
=
CoRegisterClassObject
(
&
CLSID_WineOOPTest
,
(
IUnknown
*
)
&
Test_ClassFactory
,
CLSCTX_LOCAL_SERVER
,
REGCLS_MULTI_SEPARATE
,
&
cookie
);
ok_ole_success
(
hr
,
"CoRegisterClassObject"
);
hr
=
CoRevokeClassObject
(
cookie
);
ok_ole_success
(
hr
,
"CoRevokeClassObject"
);
/* CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER */
hr
=
CoRegisterClassObject
(
&
CLSID_WineOOPTest
,
(
IUnknown
*
)
&
Test_ClassFactory
,
CLSCTX_INPROC_SERVER
|
CLSCTX_LOCAL_SERVER
,
REGCLS_SINGLEUSE
,
&
cookie
);
ok_ole_success
(
hr
,
"CoRegisterClassObject"
);
hr
=
CoRevokeClassObject
(
cookie
);
ok_ole_success
(
hr
,
"CoRevokeClassObject"
);
CoUninitialize
();
}
START_TEST
(
compobj
)
{
HMODULE
hOle32
=
GetModuleHandle
(
"ole32"
);
...
...
@@ -662,4 +723,5 @@ START_TEST(compobj)
test_CoGetInterfaceAndReleaseStream
();
test_CoMarshalInterface
();
test_CoMarshalInterThreadInterfaceInStream
();
test_CoRegisterClassObject
();
}
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