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
fd840680
Commit
fd840680
authored
Oct 14, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move NtUserOpenWindowStation implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1d30bac7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
23 deletions
+44
-23
winstation.c
dlls/user32/winstation.c
+11
-22
syscall.c
dlls/win32u/syscall.c
+1
-0
win32u.spec
dlls/win32u/win32u.spec
+1
-1
winstation.c
dlls/win32u/winstation.c
+19
-0
syscall.h
dlls/wow64win/syscall.h
+1
-0
user.c
dlls/wow64win/user.c
+10
-0
ntuser.h
include/ntuser.h
+1
-0
No files found.
dlls/user32/winstation.c
View file @
fd840680
...
...
@@ -163,28 +163,17 @@ HWINSTA WINAPI OpenWindowStationA( LPCSTR name, BOOL inherit, ACCESS_MASK access
*/
HWINSTA
WINAPI
OpenWindowStationW
(
LPCWSTR
name
,
BOOL
inherit
,
ACCESS_MASK
access
)
{
HANDLE
ret
=
0
;
DWORD
len
=
name
?
lstrlenW
(
name
)
:
0
;
if
(
len
>=
MAX_PATH
)
{
SetLastError
(
ERROR_FILENAME_EXCED_RANGE
);
return
0
;
}
if
(
!
len
)
{
name
=
get_winstation_default_name
();
len
=
lstrlenW
(
name
);
}
SERVER_START_REQ
(
open_winstation
)
{
req
->
access
=
access
;
req
->
attributes
=
OBJ_CASE_INSENSITIVE
|
(
inherit
?
OBJ_INHERIT
:
0
);
req
->
rootdir
=
wine_server_obj_handle
(
get_winstations_dir_handle
()
);
wine_server_add_data
(
req
,
name
,
len
*
sizeof
(
WCHAR
)
);
if
(
!
wine_server_call_err
(
req
))
ret
=
wine_server_ptr_handle
(
reply
->
handle
);
}
SERVER_END_REQ
;
return
ret
;
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
str
;
RtlInitUnicodeString
(
&
str
,
name
);
if
(
!
str
.
Length
)
RtlInitUnicodeString
(
&
str
,
get_winstation_default_name
()
);
InitializeObjectAttributes
(
&
attr
,
&
str
,
OBJ_CASE_INSENSITIVE
,
get_winstations_dir_handle
(),
NULL
);
if
(
inherit
)
attr
.
Attributes
|=
OBJ_INHERIT
;
return
NtUserOpenWindowStation
(
&
attr
,
access
);
}
...
...
dlls/win32u/syscall.c
View file @
fd840680
...
...
@@ -101,6 +101,7 @@ static void * const syscalls[] =
NtUserGetProcessWindowStation
,
NtUserGetThreadDesktop
,
NtUserOpenInputDesktop
,
NtUserOpenWindowStation
,
NtUserSetObjectInformation
,
NtUserSetProcessWindowStation
,
NtUserSetThreadDesktop
,
...
...
dlls/win32u/win32u.spec
View file @
fd840680
...
...
@@ -1094,7 +1094,7 @@
@ stub NtUserOpenDesktop
@ stdcall -syscall NtUserOpenInputDesktop(long long long)
@ stub NtUserOpenThreadDesktop
@ st
ub NtUserOpenWindowStation
@ st
dcall -syscall NtUserOpenWindowStation(ptr long)
@ stub NtUserPaintDesktop
@ stub NtUserPaintMenuBar
@ stub NtUserPaintMonitor
...
...
dlls/win32u/winstation.c
View file @
fd840680
...
...
@@ -61,6 +61,25 @@ HWINSTA WINAPI NtUserCreateWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK a
return
ret
;
}
/******************************************************************************
* NtUserOpenWindowStation (win32u.@)
*/
HWINSTA
WINAPI
NtUserOpenWindowStation
(
OBJECT_ATTRIBUTES
*
attr
,
ACCESS_MASK
access
)
{
HANDLE
ret
=
0
;
SERVER_START_REQ
(
open_winstation
)
{
req
->
access
=
access
;
req
->
attributes
=
attr
->
Attributes
;
req
->
rootdir
=
wine_server_obj_handle
(
attr
->
RootDirectory
);
wine_server_add_data
(
req
,
attr
->
ObjectName
->
Buffer
,
attr
->
ObjectName
->
Length
);
if
(
!
wine_server_call_err
(
req
))
ret
=
wine_server_ptr_handle
(
reply
->
handle
);
}
SERVER_END_REQ
;
return
ret
;
}
/***********************************************************************
* NtUserCloseWindowStation (win32u.@)
*/
...
...
dlls/wow64win/syscall.h
View file @
fd840680
...
...
@@ -87,6 +87,7 @@
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
SYSCALL_ENTRY( NtUserOpenInputDesktop ) \
SYSCALL_ENTRY( NtUserOpenWindowStation ) \
SYSCALL_ENTRY( NtUserSetObjectInformation ) \
SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserSetThreadDesktop )
...
...
dlls/wow64win/user.c
View file @
fd840680
...
...
@@ -44,6 +44,16 @@ NTSTATUS WINAPI wow64_NtUserCreateWindowStation( UINT *args )
arg3
,
arg4
,
arg5
,
arg6
,
arg7
));
}
NTSTATUS
WINAPI
wow64_NtUserOpenWindowStation
(
UINT
*
args
)
{
OBJECT_ATTRIBUTES32
*
attr32
=
get_ptr
(
&
args
);
ACCESS_MASK
access
=
get_ulong
(
&
args
);
struct
object_attr64
attr
;
return
HandleToUlong
(
NtUserOpenWindowStation
(
objattr_32to64
(
&
attr
,
attr32
),
access
));
}
NTSTATUS
WINAPI
wow64_NtUserCloseWindowStation
(
UINT
*
args
)
{
HWINSTA
handle
=
get_handle
(
&
args
);
...
...
include/ntuser.h
View file @
fd840680
...
...
@@ -30,6 +30,7 @@ BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info,
DWORD
len
,
DWORD
*
needed
);
HWINSTA
WINAPI
NtUserGetProcessWindowStation
(
void
);
HDESK
WINAPI
NtUserGetThreadDesktop
(
DWORD
thread
);
HWINSTA
WINAPI
NtUserOpenWindowStation
(
OBJECT_ATTRIBUTES
*
attr
,
ACCESS_MASK
access
);
BOOL
WINAPI
NtUserSetObjectInformation
(
HANDLE
handle
,
INT
index
,
void
*
info
,
DWORD
len
);
HDESK
WINAPI
NtUserOpenInputDesktop
(
DWORD
flags
,
BOOL
inherit
,
ACCESS_MASK
access
);
BOOL
WINAPI
NtUserSetProcessWindowStation
(
HWINSTA
handle
);
...
...
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