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
c07dcf59
Commit
c07dcf59
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 NtUserOpenDesktop implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
50013758
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
19 deletions
+48
-19
winstation.c
dlls/user32/winstation.c
+7
-18
syscall.c
dlls/win32u/syscall.c
+1
-0
win32u.spec
dlls/win32u/win32u.spec
+1
-1
winstation.c
dlls/win32u/winstation.c
+24
-0
syscall.h
dlls/wow64win/syscall.h
+1
-0
user.c
dlls/wow64win/user.c
+13
-0
ntuser.h
include/ntuser.h
+1
-0
No files found.
dlls/user32/winstation.c
View file @
c07dcf59
...
...
@@ -290,24 +290,13 @@ HDESK WINAPI OpenDesktopA( LPCSTR name, DWORD flags, BOOL inherit, ACCESS_MASK a
HDESK
open_winstation_desktop
(
HWINSTA
hwinsta
,
LPCWSTR
name
,
DWORD
flags
,
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
;
}
SERVER_START_REQ
(
open_desktop
)
{
req
->
winsta
=
wine_server_obj_handle
(
hwinsta
);
req
->
flags
=
flags
;
req
->
access
=
access
;
req
->
attributes
=
OBJ_CASE_INSENSITIVE
|
(
inherit
?
OBJ_INHERIT
:
0
);
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
);
InitializeObjectAttributes
(
&
attr
,
&
str
,
OBJ_CASE_INSENSITIVE
,
hwinsta
,
NULL
);
if
(
inherit
)
attr
.
Attributes
|=
OBJ_INHERIT
;
return
NtUserOpenDesktop
(
&
attr
,
flags
,
access
);
}
...
...
dlls/win32u/syscall.c
View file @
c07dcf59
...
...
@@ -101,6 +101,7 @@ static void * const syscalls[] =
NtUserGetObjectInformation
,
NtUserGetProcessWindowStation
,
NtUserGetThreadDesktop
,
NtUserOpenDesktop
,
NtUserOpenInputDesktop
,
NtUserOpenWindowStation
,
NtUserSetObjectInformation
,
...
...
dlls/win32u/win32u.spec
View file @
c07dcf59
...
...
@@ -1091,7 +1091,7 @@
@ stub NtUserNotifyProcessCreate
@ stub NtUserNotifyWinEvent
@ stub NtUserOpenClipboard
@ st
ub NtUserOpenDesktop
@ st
dcall -syscall NtUserOpenDesktop(ptr long long)
@ stdcall -syscall NtUserOpenInputDesktop(long long long)
@ stub NtUserOpenThreadDesktop
@ stdcall -syscall NtUserOpenWindowStation(ptr long)
...
...
dlls/win32u/winstation.c
View file @
c07dcf59
...
...
@@ -160,6 +160,30 @@ HDESK WINAPI NtUserCreateDesktopEx( OBJECT_ATTRIBUTES *attr, UNICODE_STRING *dev
}
/***********************************************************************
* NtUserOpenDesktop (win32u.@)
*/
HDESK
WINAPI
NtUserOpenDesktop
(
OBJECT_ATTRIBUTES
*
attr
,
DWORD
flags
,
ACCESS_MASK
access
)
{
HANDLE
ret
=
0
;
if
(
attr
->
ObjectName
->
Length
>=
MAX_PATH
*
sizeof
(
WCHAR
))
{
SetLastError
(
ERROR_FILENAME_EXCED_RANGE
);
return
0
;
}
SERVER_START_REQ
(
open_desktop
)
{
req
->
winsta
=
wine_server_obj_handle
(
attr
->
RootDirectory
);
req
->
flags
=
flags
;
req
->
access
=
access
;
req
->
attributes
=
attr
->
Attributes
;
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
;
}
/***********************************************************************
* NtUserCloseDesktop (win32u.@)
*/
BOOL
WINAPI
NtUserCloseDesktop
(
HDESK
handle
)
...
...
dlls/wow64win/syscall.h
View file @
c07dcf59
...
...
@@ -87,6 +87,7 @@
SYSCALL_ENTRY( NtUserCreateWindowStation ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
SYSCALL_ENTRY( NtUserOpenDesktop ) \
SYSCALL_ENTRY( NtUserOpenInputDesktop ) \
SYSCALL_ENTRY( NtUserOpenWindowStation ) \
SYSCALL_ENTRY( NtUserSetObjectInformation ) \
...
...
dlls/wow64win/user.c
View file @
c07dcf59
...
...
@@ -92,6 +92,19 @@ NTSTATUS WINAPI wow64_NtUserCreateDesktopEx( UINT *args )
return
HandleToUlong
(
ret
);
}
NTSTATUS
WINAPI
wow64_NtUserOpenDesktop
(
UINT
*
args
)
{
OBJECT_ATTRIBUTES32
*
attr32
=
get_ptr
(
&
args
);
DWORD
flags
=
get_ulong
(
&
args
);
ACCESS_MASK
access
=
get_ulong
(
&
args
);
struct
object_attr64
attr
;
HANDLE
ret
;
ret
=
NtUserOpenDesktop
(
objattr_32to64
(
&
attr
,
attr32
),
flags
,
access
);
return
HandleToUlong
(
ret
);
}
NTSTATUS
WINAPI
wow64_NtUserCloseDesktop
(
UINT
*
args
)
{
HDESK
handle
=
get_handle
(
&
args
);
...
...
include/ntuser.h
View file @
c07dcf59
...
...
@@ -36,6 +36,7 @@ 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
NtUserOpenDesktop
(
OBJECT_ATTRIBUTES
*
attr
,
DWORD
flags
,
ACCESS_MASK
access
);
HDESK
WINAPI
NtUserOpenInputDesktop
(
DWORD
flags
,
BOOL
inherit
,
ACCESS_MASK
access
);
BOOL
WINAPI
NtUserSetProcessWindowStation
(
HWINSTA
handle
);
BOOL
WINAPI
NtUserSetThreadDesktop
(
HDESK
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