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
2871b4f6
Commit
2871b4f6
authored
Mar 06, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl/tests: Use HKCU instead of HKCR for registrar tests.
parent
b05a3e99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
35 deletions
+4
-35
registrar.c
dlls/atl/tests/registrar.c
+4
-35
No files found.
dlls/atl/tests/registrar.c
View file @
2871b4f6
...
...
@@ -37,36 +37,8 @@
#include <initguid.h>
#include <atliface.h>
static
BOOL
is_process_limited
(
void
)
{
static
BOOL
(
WINAPI
*
pOpenProcessToken
)(
HANDLE
,
DWORD
,
PHANDLE
)
=
NULL
;
HANDLE
token
;
if
(
!
pOpenProcessToken
)
{
HMODULE
hadvapi32
=
GetModuleHandleA
(
"advapi32.dll"
);
pOpenProcessToken
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"OpenProcessToken"
);
if
(
!
pOpenProcessToken
)
return
FALSE
;
}
if
(
pOpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
,
&
token
))
{
BOOL
ret
;
TOKEN_ELEVATION_TYPE
type
=
TokenElevationTypeDefault
;
DWORD
size
;
ret
=
GetTokenInformation
(
token
,
TokenElevationType
,
&
type
,
sizeof
(
type
),
&
size
);
CloseHandle
(
token
);
return
(
ret
&&
type
==
TokenElevationTypeLimited
);
}
return
FALSE
;
}
static
const
char
textA
[]
=
"HKC
R
\n
"
"HKC
U
\n
"
"{
\n
"
" ForceRemove eebf73c4-50fd-478f-bbcf-db212221227a
\n
"
" {
\n
"
...
...
@@ -96,7 +68,7 @@ static void test_registrar(void)
hr
=
CoCreateInstance
(
&
CLSID_Registrar
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IRegistrar
,
(
void
**
)
&
registrar
);
if
(
FAILED
(
hr
))
{
skip
(
"creating IRegistrar failed, hr = 0x%08X
\n
"
,
hr
);
win_
skip
(
"creating IRegistrar failed, hr = 0x%08X
\n
"
,
hr
);
return
;
}
...
...
@@ -112,17 +84,14 @@ static void test_registrar(void)
MultiByteToWideChar
(
CP_ACP
,
0
,
textA
,
-
1
,
textW
,
count
);
hr
=
IRegistrar_StringRegister
(
registrar
,
textW
);
ok
(
hr
==
S_OK
,
"StringRegister failed: %08x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
{
BOOL
is_limited
=
is_process_limited
();
ok
(
hr
==
DISP_E_EXCEPTION
&&
is_limited
,
"IRegistrar_StringRegister failed, hr = 0x%08X, is_limited=%d
\n
"
,
hr
,
is_limited
);
skip
(
"Skipping registrar tests
\n
"
);
IRegistrar_Release
(
registrar
);
return
;
}
lret
=
RegOpenKeyA
(
HKEY_C
LASSES_ROOT
,
"eebf73c4-50fd-478f-bbcf-db212221227a"
,
&
key
);
lret
=
RegOpenKeyA
(
HKEY_C
URRENT_USER
,
"eebf73c4-50fd-478f-bbcf-db212221227a"
,
&
key
);
ok
(
lret
==
ERROR_SUCCESS
,
"error %d opening registry key
\n
"
,
lret
);
size
=
sizeof
(
dword
);
...
...
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