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
e4e1b897
Commit
e4e1b897
authored
Oct 08, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Added session id tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
888d1c67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
process.c
dlls/kernel32/tests/process.c
+25
-0
No files found.
dlls/kernel32/tests/process.c
View file @
e4e1b897
...
...
@@ -77,6 +77,8 @@ static BOOL (WINAPI *pSetInformationJobObject)(HANDLE job, JOBOBJECTINFOCLASS
static
HANDLE
(
WINAPI
*
pCreateIoCompletionPort
)(
HANDLE
file
,
HANDLE
existing_port
,
ULONG_PTR
key
,
DWORD
threads
);
static
BOOL
(
WINAPI
*
pGetNumaProcessorNode
)(
UCHAR
,
PUCHAR
);
static
NTSTATUS
(
WINAPI
*
pNtQueryInformationProcess
)(
HANDLE
,
PROCESSINFOCLASS
,
PVOID
,
ULONG
,
PULONG
);
static
BOOL
(
WINAPI
*
pProcessIdToSessionId
)(
DWORD
,
DWORD
*
);
static
DWORD
(
WINAPI
*
pWTSGetActiveConsoleSessionId
)(
void
);
/* ############################### */
static
char
base
[
MAX_PATH
];
...
...
@@ -233,6 +235,8 @@ static BOOL init(void)
pSetInformationJobObject
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"SetInformationJobObject"
);
pCreateIoCompletionPort
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"CreateIoCompletionPort"
);
pGetNumaProcessorNode
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetNumaProcessorNode"
);
pProcessIdToSessionId
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"ProcessIdToSessionId"
);
pWTSGetActiveConsoleSessionId
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"WTSGetActiveConsoleSessionId"
);
return
TRUE
;
}
...
...
@@ -2788,6 +2792,25 @@ static void test_GetNumaProcessorNode(void)
}
}
static
void
test_session_info
(
void
)
{
DWORD
session_id
,
active_session
;
BOOL
r
;
if
(
!
pProcessIdToSessionId
)
{
win_skip
(
"ProcessIdToSessionId is missing
\n
"
);
return
;
}
r
=
pProcessIdToSessionId
(
GetCurrentProcessId
(),
&
session_id
);
ok
(
r
,
"ProcessIdToSessionId failed: %u
\n
"
,
GetLastError
());
trace
(
"session_id = %x
\n
"
,
session_id
);
active_session
=
pWTSGetActiveConsoleSessionId
();
trace
(
"active_session = %x
\n
"
,
active_session
);
}
static
void
test_process_info
(
void
)
{
char
buf
[
4096
];
...
...
@@ -2994,6 +3017,8 @@ START_TEST(process)
test_DuplicateHandle
();
test_StartupNoConsole
();
test_GetNumaProcessorNode
();
test_session_info
();
/* things that can be tested:
* lookup: check the way program to be executed is searched
* handles: check the handle inheritance stuff (+sec options)
...
...
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