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
911e59c1
Commit
911e59c1
authored
Jul 18, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Store window station objects under the session directory.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2f514bec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
winstation.c
dlls/user32/winstation.c
+5
-2
No files found.
dlls/user32/winstation.c
View file @
911e59c1
...
...
@@ -59,8 +59,10 @@ static BOOL CALLBACK enum_names_WtoA( LPWSTR name, LPARAM lparam )
static
HANDLE
get_winstations_dir_handle
(
void
)
{
static
HANDLE
handle
=
NULL
;
static
const
WCHAR
basenameW
[]
=
{
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
static
const
WCHAR
basenameW
[]
=
{
'\\'
,
'S'
,
'e'
,
's'
,
's'
,
'i'
,
'o'
,
'n'
,
's'
,
'\\'
,
'%'
,
'u'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
'S'
,
't'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
's'
,
0
};
WCHAR
buffer
[
64
];
UNICODE_STRING
str
;
OBJECT_ATTRIBUTES
attr
;
...
...
@@ -68,7 +70,8 @@ static HANDLE get_winstations_dir_handle(void)
{
HANDLE
dir
;
RtlInitUnicodeString
(
&
str
,
basenameW
);
sprintfW
(
buffer
,
basenameW
,
NtCurrentTeb
()
->
Peb
->
SessionId
);
RtlInitUnicodeString
(
&
str
,
buffer
);
InitializeObjectAttributes
(
&
attr
,
&
str
,
0
,
0
,
NULL
);
NtOpenDirectoryObject
(
&
dir
,
DIRECTORY_CREATE_OBJECT
|
DIRECTORY_TRAVERSE
,
&
attr
);
if
(
InterlockedCompareExchangePointer
(
&
handle
,
dir
,
0
)
!=
0
)
/* someone beat us here */
...
...
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