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
479b7bcf
Commit
479b7bcf
authored
Nov 22, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Add a test to show that CoGetPSClsid is not affected by an override…
ole32/tests: Add a test to show that CoGetPSClsid is not affected by an override of HKEY_CLASSES_ROOT.
parent
b8a7ead3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
compobj.c
dlls/ole32/tests/compobj.c
+27
-0
No files found.
dlls/ole32/tests/compobj.c
View file @
479b7bcf
...
...
@@ -41,6 +41,7 @@ static HRESULT (WINAPI * pCoGetObjectContext)(REFIID riid, LPVOID *ppv);
static
HRESULT
(
WINAPI
*
pCoSwitchCallContext
)(
IUnknown
*
pObject
,
IUnknown
**
ppOldObject
);
static
HRESULT
(
WINAPI
*
pCoGetTreatAsClass
)(
REFCLSID
clsidOld
,
LPCLSID
pClsidNew
);
static
HRESULT
(
WINAPI
*
pCoGetContextToken
)(
ULONG_PTR
*
token
);
static
LONG
(
WINAPI
*
pRegOverridePredefKey
)(
HKEY
key
,
HKEY
override
);
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks)
...
...
@@ -715,6 +716,8 @@ static void test_CoGetPSClsid(void)
{
HRESULT
hr
;
CLSID
clsid
;
HKEY
hkey
;
LONG
res
;
hr
=
CoGetPSClsid
(
&
IID_IClassFactory
,
&
clsid
);
ok
(
hr
==
CO_E_NOTINITIALIZED
,
...
...
@@ -736,6 +739,28 @@ static void test_CoGetPSClsid(void)
"CoGetPSClsid for null clsid returned 0x%08x instead of E_INVALIDARG
\n
"
,
hr
);
if
(
!
pRegOverridePredefKey
)
{
win_skip
(
"RegOverridePredefKey not available
\n
"
);
CoUninitialize
();
return
;
}
hr
=
CoGetPSClsid
(
&
IID_IClassFactory
,
&
clsid
);
ok_ole_success
(
hr
,
"CoGetPSClsid"
);
res
=
RegOpenKeyExA
(
HKEY_CURRENT_USER
,
"Software
\\
Classes"
,
0
,
KEY_ALL_ACCESS
,
&
hkey
);
ok
(
!
res
,
"RegOpenKeyExA returned %d
\n
"
,
res
);
res
=
pRegOverridePredefKey
(
HKEY_CLASSES_ROOT
,
hkey
);
ok
(
!
res
,
"RegOverridePredefKey returned %d
\n
"
,
res
);
hr
=
CoGetPSClsid
(
&
IID_IClassFactory
,
&
clsid
);
todo_wine
ok_ole_success
(
hr
,
"CoGetPSClsid"
);
res
=
pRegOverridePredefKey
(
HKEY_CLASSES_ROOT
,
NULL
);
ok
(
!
res
,
"RegOverridePredefKey returned %d
\n
"
,
res
);
RegCloseKey
(
hkey
);
CoUninitialize
();
}
...
...
@@ -1512,10 +1537,12 @@ static void test_CoInitializeEx(void)
START_TEST
(
compobj
)
{
HMODULE
hOle32
=
GetModuleHandle
(
"ole32"
);
HMODULE
hAdvapi32
=
GetModuleHandle
(
"advapi32"
);
pCoGetObjectContext
=
(
void
*
)
GetProcAddress
(
hOle32
,
"CoGetObjectContext"
);
pCoSwitchCallContext
=
(
void
*
)
GetProcAddress
(
hOle32
,
"CoSwitchCallContext"
);
pCoGetTreatAsClass
=
(
void
*
)
GetProcAddress
(
hOle32
,
"CoGetTreatAsClass"
);
pCoGetContextToken
=
(
void
*
)
GetProcAddress
(
hOle32
,
"CoGetContextToken"
);
pRegOverridePredefKey
=
(
void
*
)
GetProcAddress
(
hAdvapi32
,
"RegOverridePredefKey"
);
if
(
!
(
pCoInitializeEx
=
(
void
*
)
GetProcAddress
(
hOle32
,
"CoInitializeEx"
)))
{
trace
(
"You need DCOM95 installed to run this test
\n
"
);
...
...
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