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
50013758
Commit
50013758
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 NtUserCreateDesktopEx implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fd840680
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
20 deletions
+66
-20
winstation.c
dlls/user32/winstation.c
+8
-19
syscall.c
dlls/win32u/syscall.c
+1
-0
win32u.spec
dlls/win32u/win32u.spec
+1
-1
winstation.c
dlls/win32u/winstation.c
+32
-0
syscall.h
dlls/wow64win/syscall.h
+1
-0
user.c
dlls/wow64win/user.c
+19
-0
ntuser.h
include/ntuser.h
+4
-0
No files found.
dlls/user32/winstation.c
View file @
50013758
...
...
@@ -253,31 +253,20 @@ HDESK WINAPI CreateDesktopA( LPCSTR name, LPCSTR device, LPDEVMODEA devmode,
HDESK
WINAPI
CreateDesktopW
(
LPCWSTR
name
,
LPCWSTR
device
,
LPDEVMODEW
devmode
,
DWORD
flags
,
ACCESS_MASK
access
,
LPSECURITY_ATTRIBUTES
sa
)
{
HANDLE
ret
;
DWORD
len
=
name
?
lstrlenW
(
name
)
:
0
;
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
str
;
if
(
device
||
devmode
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
if
(
len
>=
MAX_PATH
)
{
SetLastError
(
ERROR_FILENAME_EXCED_RANGE
);
return
0
;
}
SERVER_START_REQ
(
create_desktop
)
{
req
->
flags
=
flags
;
req
->
access
=
access
;
req
->
attributes
=
OBJ_CASE_INSENSITIVE
|
OBJ_OPENIF
|
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
wine_server_add_data
(
req
,
name
,
len
*
sizeof
(
WCHAR
)
);
wine_server_call_err
(
req
);
ret
=
wine_server_ptr_handle
(
reply
->
handle
);
}
SERVER_END_REQ
;
return
ret
;
RtlInitUnicodeString
(
&
str
,
name
);
InitializeObjectAttributes
(
&
attr
,
&
str
,
OBJ_CASE_INSENSITIVE
|
OBJ_OPENIF
,
get_winstations_dir_handle
(),
NULL
);
if
(
sa
&&
sa
->
bInheritHandle
)
attr
.
Attributes
|=
OBJ_INHERIT
;
return
NtUserCreateDesktopEx
(
&
attr
,
NULL
,
devmode
,
flags
,
access
,
0
);
}
...
...
dlls/win32u/syscall.c
View file @
50013758
...
...
@@ -96,6 +96,7 @@ static void * const syscalls[] =
NtGdiTransformPoints
,
NtUserCloseDesktop
,
NtUserCloseWindowStation
,
NtUserCreateDesktopEx
,
NtUserCreateWindowStation
,
NtUserGetObjectInformation
,
NtUserGetProcessWindowStation
,
...
...
dlls/win32u/win32u.spec
View file @
50013758
...
...
@@ -809,7 +809,7 @@
@ stub NtUserCreateActivationObject
@ stub NtUserCreateCaret
@ stub NtUserCreateDCompositionHwndTarget
@ st
ub NtUserCreateDesktopEx
@ st
dcall -syscall NtUserCreateDesktopEx(ptr ptr ptr long long long)
@ stub NtUserCreateEmptyCursorObject
@ stub NtUserCreateInputContext
@ stub NtUserCreateLocalMemHandle
...
...
dlls/win32u/winstation.c
View file @
50013758
...
...
@@ -128,6 +128,38 @@ BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle )
}
/***********************************************************************
* NtUserCreateDesktopEx (win32u.@)
*/
HDESK
WINAPI
NtUserCreateDesktopEx
(
OBJECT_ATTRIBUTES
*
attr
,
UNICODE_STRING
*
device
,
DEVMODEW
*
devmode
,
DWORD
flags
,
ACCESS_MASK
access
,
ULONG
heap_size
)
{
HANDLE
ret
;
if
((
device
&&
device
->
Length
)
||
devmode
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
if
(
attr
->
ObjectName
->
Length
>=
MAX_PATH
*
sizeof
(
WCHAR
))
{
SetLastError
(
ERROR_FILENAME_EXCED_RANGE
);
return
0
;
}
SERVER_START_REQ
(
create_desktop
)
{
req
->
flags
=
flags
;
req
->
access
=
access
;
req
->
attributes
=
attr
->
Attributes
;
wine_server_add_data
(
req
,
attr
->
ObjectName
->
Buffer
,
attr
->
ObjectName
->
Length
);
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 @
50013758
...
...
@@ -83,6 +83,7 @@
SYSCALL_ENTRY( NtGdiTransformPoints ) \
SYSCALL_ENTRY( NtUserCloseDesktop ) \
SYSCALL_ENTRY( NtUserCloseWindowStation ) \
SYSCALL_ENTRY( NtUserCreateDesktopEx ) \
SYSCALL_ENTRY( NtUserCreateWindowStation ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
...
...
dlls/wow64win/user.c
View file @
50013758
...
...
@@ -73,6 +73,25 @@ NTSTATUS WINAPI wow64_NtUserSetProcessWindowStation( UINT *args )
return
NtUserSetProcessWindowStation
(
handle
);
}
NTSTATUS
WINAPI
wow64_NtUserCreateDesktopEx
(
UINT
*
args
)
{
OBJECT_ATTRIBUTES32
*
attr32
=
get_ptr
(
&
args
);
UNICODE_STRING32
*
device32
=
get_ptr
(
&
args
);
DEVMODEW
*
devmode
=
get_ptr
(
&
args
);
DWORD
flags
=
get_ulong
(
&
args
);
ACCESS_MASK
access
=
get_ulong
(
&
args
);
ULONG
heap_size
=
get_ulong
(
&
args
);
struct
object_attr64
attr
;
UNICODE_STRING
device
;
HANDLE
ret
;
ret
=
NtUserCreateDesktopEx
(
objattr_32to64
(
&
attr
,
attr32
),
unicode_str_32to64
(
&
device
,
device32
),
devmode
,
flags
,
access
,
heap_size
);
return
HandleToUlong
(
ret
);
}
NTSTATUS
WINAPI
wow64_NtUserCloseDesktop
(
UINT
*
args
)
{
HDESK
handle
=
get_handle
(
&
args
);
...
...
include/ntuser.h
View file @
50013758
...
...
@@ -20,10 +20,14 @@
#define _NTUSER_
#include <winuser.h>
#include <wingdi.h>
#include <winternl.h>
BOOL
WINAPI
NtUserCloseDesktop
(
HDESK
handle
);
BOOL
WINAPI
NtUserCloseWindowStation
(
HWINSTA
handle
);
HDESK
WINAPI
NtUserCreateDesktopEx
(
OBJECT_ATTRIBUTES
*
attr
,
UNICODE_STRING
*
device
,
DEVMODEW
*
devmode
,
DWORD
flags
,
ACCESS_MASK
access
,
ULONG
heap_size
);
HWINSTA
WINAPI
NtUserCreateWindowStation
(
OBJECT_ATTRIBUTES
*
attr
,
ACCESS_MASK
mask
,
ULONG
arg3
,
ULONG
arg4
,
ULONG
arg5
,
ULONG
arg6
,
ULONG
arg7
);
BOOL
WINAPI
NtUserGetObjectInformation
(
HANDLE
handle
,
INT
index
,
void
*
info
,
...
...
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