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
35a59e07
Commit
35a59e07
authored
Jul 25, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use syscall interface for NtUserSystemParametersInfo.
parent
2ebfe2fd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
116 additions
and
19 deletions
+116
-19
gdiobj.c
dlls/win32u/gdiobj.c
+0
-2
syscall.c
dlls/win32u/syscall.c
+2
-0
win32u.spec
dlls/win32u/win32u.spec
+2
-2
win32u_private.h
dlls/win32u/win32u_private.h
+0
-3
wrappers.c
dlls/win32u/wrappers.c
+0
-12
syscall.h
dlls/wow64win/syscall.h
+2
-0
user.c
dlls/wow64win/user.c
+110
-0
No files found.
dlls/win32u/gdiobj.c
View file @
35a59e07
...
...
@@ -1143,8 +1143,6 @@ static struct unix_funcs unix_funcs =
NtUserReleaseDC
,
NtUserScrollDC
,
NtUserSelectPalette
,
NtUserSystemParametersInfo
,
NtUserSystemParametersInfoForDpi
,
NtUserUpdateLayeredWindow
,
SetDIBits
,
...
...
dlls/win32u/syscall.c
View file @
35a59e07
...
...
@@ -281,6 +281,8 @@ static void * const syscalls[] =
NtUserShowScrollBar
,
NtUserShowWindow
,
NtUserShowWindowAsync
,
NtUserSystemParametersInfo
,
NtUserSystemParametersInfoForDpi
,
NtUserThunkedMenuInfo
,
NtUserThunkedMenuItemInfo
,
NtUserToUnicodeEx
,
...
...
dlls/win32u/win32u.spec
View file @
35a59e07
...
...
@@ -1271,8 +1271,8 @@
@ stub NtUserSoundSentry
@ stub NtUserStopAndEndInertia
@ stub NtUserSwitchDesktop
@ stdcall NtUserSystemParametersInfo(long long ptr long)
@ stdcall NtUserSystemParametersInfoForDpi(long long ptr long long)
@ stdcall
-syscall
NtUserSystemParametersInfo(long long ptr long)
@ stdcall
-syscall
NtUserSystemParametersInfoForDpi(long long ptr long long)
@ stub NtUserTestForInteractiveUser
@ stdcall -syscall NtUserThunkedMenuInfo(long ptr)
@ stdcall -syscall NtUserThunkedMenuItemInfo(long long long long ptr ptr)
...
...
dlls/win32u/win32u_private.h
View file @
35a59e07
...
...
@@ -195,9 +195,6 @@ struct unix_funcs
BOOL
(
WINAPI
*
pNtUserScrollDC
)(
HDC
hdc
,
INT
dx
,
INT
dy
,
const
RECT
*
scroll
,
const
RECT
*
clip
,
HRGN
ret_update_rgn
,
RECT
*
update_rect
);
HPALETTE
(
WINAPI
*
pNtUserSelectPalette
)(
HDC
hdc
,
HPALETTE
hpal
,
WORD
bkg
);
BOOL
(
WINAPI
*
pNtUserSystemParametersInfo
)(
UINT
action
,
UINT
val
,
PVOID
ptr
,
UINT
winini
);
BOOL
(
WINAPI
*
pNtUserSystemParametersInfoForDpi
)(
UINT
action
,
UINT
val
,
PVOID
ptr
,
UINT
winini
,
UINT
dpi
);
BOOL
(
WINAPI
*
pNtUserUpdateLayeredWindow
)(
HWND
hwnd
,
HDC
hdc_dst
,
const
POINT
*
pts_dst
,
const
SIZE
*
size
,
HDC
hdc_src
,
const
POINT
*
pts_src
,
COLORREF
key
,
const
BLENDFUNCTION
*
blend
,
...
...
dlls/win32u/wrappers.c
View file @
35a59e07
...
...
@@ -763,18 +763,6 @@ HPALETTE WINAPI NtUserSelectPalette( HDC hdc, HPALETTE hpal, WORD bkg )
return
unix_funcs
->
pNtUserSelectPalette
(
hdc
,
hpal
,
bkg
);
}
BOOL
WINAPI
NtUserSystemParametersInfo
(
UINT
action
,
UINT
val
,
PVOID
ptr
,
UINT
winini
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtUserSystemParametersInfo
(
action
,
val
,
ptr
,
winini
);
}
BOOL
WINAPI
NtUserSystemParametersInfoForDpi
(
UINT
action
,
UINT
val
,
PVOID
ptr
,
UINT
winini
,
UINT
dpi
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtUserSystemParametersInfoForDpi
(
action
,
val
,
ptr
,
winini
,
dpi
);
}
BOOL
WINAPI
NtUserUpdateLayeredWindow
(
HWND
hwnd
,
HDC
hdc_dst
,
const
POINT
*
pts_dst
,
const
SIZE
*
size
,
HDC
hdc_src
,
const
POINT
*
pts_src
,
COLORREF
key
,
const
BLENDFUNCTION
*
blend
,
DWORD
flags
,
const
RECT
*
dirty
)
...
...
dlls/wow64win/syscall.h
View file @
35a59e07
...
...
@@ -268,6 +268,8 @@
SYSCALL_ENTRY( NtUserShowScrollBar ) \
SYSCALL_ENTRY( NtUserShowWindow ) \
SYSCALL_ENTRY( NtUserShowWindowAsync ) \
SYSCALL_ENTRY( NtUserSystemParametersInfo ) \
SYSCALL_ENTRY( NtUserSystemParametersInfoForDpi ) \
SYSCALL_ENTRY( NtUserThunkedMenuInfo ) \
SYSCALL_ENTRY( NtUserThunkedMenuItemInfo ) \
SYSCALL_ENTRY( NtUserToUnicodeEx ) \
...
...
dlls/wow64win/user.c
View file @
35a59e07
...
...
@@ -2286,6 +2286,116 @@ NTSTATUS WINAPI wow64_NtUserShowWindowAsync( UINT *args )
return
NtUserShowWindowAsync
(
hwnd
,
cmd
);
}
NTSTATUS
WINAPI
wow64_NtUserSystemParametersInfo
(
UINT
*
args
)
{
UINT
action
=
get_ulong
(
&
args
);
UINT
val
=
get_ulong
(
&
args
);
void
*
ptr
=
get_ptr
(
&
args
);
UINT
winini
=
get_ulong
(
&
args
);
switch
(
action
)
{
case
SPI_GETSERIALKEYS
:
if
(
ptr
)
{
struct
{
UINT
cbSize
;
DWORD
dwFlags
;
ULONG
lpszActivePort
;
ULONG
lpszPort
;
UINT
iBaudRate
;
UINT
iPortState
;
UINT
iActive
;
}
*
keys32
=
ptr
;
SERIALKEYSW
keys
;
if
(
keys32
->
cbSize
!=
sizeof
(
*
keys32
))
return
FALSE
;
keys
.
cbSize
=
sizeof
(
keys
);
if
(
!
NtUserSystemParametersInfo
(
action
,
val
,
&
keys
,
winini
))
return
FALSE
;
keys32
->
dwFlags
=
keys
.
dwFlags
;
keys32
->
lpszActivePort
=
PtrToUlong
(
keys
.
lpszActivePort
);
keys32
->
lpszPort
=
PtrToUlong
(
keys
.
lpszPort
);
keys32
->
iBaudRate
=
keys
.
iBaudRate
;
keys32
->
iPortState
=
keys
.
iPortState
;
keys32
->
iActive
=
keys
.
iActive
;
return
TRUE
;
}
break
;
case
SPI_GETSOUNDSENTRY
:
if
(
ptr
)
{
struct
{
UINT
cbSize
;
DWORD
dwFlags
;
DWORD
iFSTextEffect
;
DWORD
iFSTextEffectMSec
;
DWORD
iFSTextEffectColorBits
;
DWORD
iFSGrafEffect
;
DWORD
iFSGrafEffectMSec
;
DWORD
iFSGrafEffectColor
;
DWORD
iWindowsEffect
;
DWORD
iWindowsEffectMSec
;
ULONG
lpszWindowsEffectDLL
;
DWORD
iWindowsEffectOrdinal
;
}
*
entry32
=
ptr
;
SOUNDSENTRYW
entry
;
if
(
entry32
->
cbSize
!=
sizeof
(
*
entry32
))
return
FALSE
;
entry
.
cbSize
=
sizeof
(
entry
);
if
(
!
NtUserSystemParametersInfo
(
action
,
val
,
&
entry
,
winini
))
return
FALSE
;
entry32
->
dwFlags
=
entry
.
dwFlags
;
entry32
->
iFSTextEffect
=
entry
.
iFSTextEffect
;
entry32
->
iFSTextEffectMSec
=
entry
.
iFSTextEffectMSec
;
entry32
->
iFSTextEffectColorBits
=
entry
.
iFSTextEffectColorBits
;
entry32
->
iFSGrafEffect
=
entry
.
iFSGrafEffect
;
entry32
->
iFSGrafEffectMSec
=
entry
.
iFSGrafEffectMSec
;
entry32
->
iFSGrafEffectColor
=
entry
.
iFSGrafEffectColor
;
entry32
->
iWindowsEffect
=
entry
.
iWindowsEffect
;
entry32
->
iWindowsEffectMSec
=
entry
.
iWindowsEffectMSec
;
entry32
->
lpszWindowsEffectDLL
=
PtrToUlong
(
entry
.
lpszWindowsEffectDLL
);
entry32
->
iWindowsEffectOrdinal
=
entry
.
iWindowsEffectOrdinal
;
return
TRUE
;
}
break
;
case
SPI_GETHIGHCONTRAST
:
if
(
ptr
)
{
struct
{
UINT
cbSize
;
DWORD
dwFlags
;
ULONG
lpszDefaultScheme
;
}
*
info32
=
ptr
;
HIGHCONTRASTW
info
;
if
(
info32
->
cbSize
!=
sizeof
(
*
info32
))
return
FALSE
;
info
.
cbSize
=
sizeof
(
info
);
if
(
!
NtUserSystemParametersInfo
(
action
,
val
,
&
info
,
winini
))
return
FALSE
;
info32
->
dwFlags
=
info
.
dwFlags
;
info32
->
lpszDefaultScheme
=
PtrToUlong
(
info
.
lpszDefaultScheme
);
return
TRUE
;
}
break
;
}
return
NtUserSystemParametersInfo
(
action
,
val
,
ptr
,
winini
);
}
NTSTATUS
WINAPI
wow64_NtUserSystemParametersInfoForDpi
(
UINT
*
args
)
{
UINT
action
=
get_ulong
(
&
args
);
UINT
val
=
get_ulong
(
&
args
);
void
*
ptr
=
get_ptr
(
&
args
);
UINT
winini
=
get_ulong
(
&
args
);
UINT
dpi
=
get_ulong
(
&
args
);
return
NtUserSystemParametersInfoForDpi
(
action
,
val
,
ptr
,
winini
,
dpi
);
}
NTSTATUS
WINAPI
wow64_NtUserThunkedMenuInfo
(
UINT
*
args
)
{
HMENU
menu
=
get_handle
(
&
args
);
...
...
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