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
9eaf3551
Commit
9eaf3551
authored
Feb 17, 2014
by
Francois Gouget
Committed by
Alexandre Julliard
Feb 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl100/tests: Skip the test_regcat() tests if we don't have elevated privileges.
parent
ff08cd59
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
atl.c
dlls/atl100/tests/atl.c
+32
-0
No files found.
dlls/atl100/tests/atl.c
View file @
9eaf3551
...
...
@@ -43,6 +43,32 @@ static const GUID CATID_CatTest2 =
{
0x178fc163
,
0x0000
,
0x0000
,{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0x46
}};
#define CATID_CATTEST2_STR "178fc163-0000-0000-0000-000000000246"
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
void
test_winmodule
(
void
)
{
_AtlCreateWndData
create_data
[
3
];
...
...
@@ -148,6 +174,12 @@ static void test_regcat(void)
{
_ATL_CATMAP_ENTRY_END
}
};
if
(
is_process_limited
())
{
skip
(
"process is limited
\n
"
);
return
;
}
hres
=
AtlRegisterClassCategoriesHelper
(
&
CLSID_Test
,
catmap
,
TRUE
);
ok
(
hres
==
S_OK
,
"AtlRegisterClassCategoriesHelper failed: %08x
\n
"
,
hres
);
...
...
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