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
ce91ef64
Commit
ce91ef64
authored
Nov 20, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Add SetProcessInformation().
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53954
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
ec749f4e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
4 deletions
+46
-4
kernel32.spec
dlls/kernel32/kernel32.spec
+1
-0
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+1
-1
process.c
dlls/kernelbase/process.c
+20
-0
process.c
dlls/wow64/process.c
+3
-0
wdm.h
include/ddk/wdm.h
+1
-1
winbase.h
include/winbase.h
+16
-0
winternl.h
include/winternl.h
+4
-2
No files found.
dlls/kernel32/kernel32.spec
View file @
ce91ef64
...
...
@@ -1448,6 +1448,7 @@
@ stdcall -import SetProcessAffinityUpdateMode(long long)
@ stdcall -import SetProcessDefaultCpuSets(ptr ptr long)
@ stdcall SetProcessDEPPolicy(long)
@ stdcall -import SetProcessInformation(long long ptr long)
@ stdcall -import SetProcessMitigationPolicy(long ptr long)
@ stdcall -import SetProcessPreferredUILanguages(long ptr ptr)
@ stdcall -import SetProcessPriorityBoost(long long)
...
...
dlls/kernelbase/kernelbase.spec
View file @
ce91ef64
...
...
@@ -1494,7 +1494,7 @@
@ stdcall SetProcessAffinityUpdateMode(long long)
@ stdcall SetProcessDefaultCpuSets(ptr ptr long)
@ stdcall SetProcessGroupAffinity(long ptr ptr)
# @ stub SetProcessInformation
@ stdcall SetProcessInformation(long long ptr long)
@ stdcall SetProcessMitigationPolicy(long ptr long)
@ stdcall SetProcessPreferredUILanguages(long ptr ptr)
@ stdcall SetProcessPriorityBoost(long long)
...
...
dlls/kernelbase/process.c
View file @
ce91ef64
...
...
@@ -691,6 +691,26 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW( const WCHAR *app_name, WCHAR *cmd_
}
/**********************************************************************
* SetProcessInformation (kernelbase.@)
*/
BOOL
WINAPI
SetProcessInformation
(
HANDLE
process
,
PROCESS_INFORMATION_CLASS
info_class
,
void
*
info
,
DWORD
size
)
{
switch
(
info_class
)
{
case
ProcessMemoryPriority
:
return
set_ntstatus
(
NtSetInformationProcess
(
process
,
ProcessPagePriority
,
info
,
size
));
case
ProcessPowerThrottling
:
return
set_ntstatus
(
NtSetInformationProcess
(
process
,
ProcessPowerThrottlingState
,
info
,
size
));
case
ProcessLeapSecondInfo
:
return
set_ntstatus
(
NtSetInformationProcess
(
process
,
ProcessLeapSecondInformation
,
info
,
size
));
default:
FIXME
(
"Unrecognized information class %d.
\n
"
,
info_class
);
return
FALSE
;
}
}
/*********************************************************************
* DuplicateHandle (kernelbase.@)
*/
...
...
dlls/wow64/process.c
View file @
ce91ef64
...
...
@@ -1078,6 +1078,9 @@ NTSTATUS WINAPI wow64_NtSetInformationProcess( UINT *args )
case
ProcessDefaultHardErrorMode
:
/* ULONG */
case
ProcessPriorityClass
:
/* PROCESS_PRIORITY_CLASS */
case
ProcessExecuteFlags
:
/* ULONG */
case
ProcessPagePriority
:
/* MEMORY_PRIORITY_INFORMATION */
case
ProcessPowerThrottlingState
:
/* PROCESS_POWER_THROTTLING_STATE */
case
ProcessLeapSecondInformation
:
/* PROCESS_LEAP_SECOND_INFO */
return
NtSetInformationProcess
(
handle
,
class
,
ptr
,
len
);
case
ProcessAffinityMask
:
/* ULONG_PTR */
...
...
include/ddk/wdm.h
View file @
ce91ef64
...
...
@@ -1943,7 +1943,7 @@ NTSTATUS WINAPI ZwSetEvent(HANDLE,PULONG);
NTSTATUS
WINAPI
ZwSetInformationFile
(
HANDLE
,
PIO_STATUS_BLOCK
,
PVOID
,
ULONG
,
FILE_INFORMATION_CLASS
);
NTSTATUS
WINAPI
ZwSetInformationKey
(
HANDLE
,
const
int
,
PVOID
,
ULONG
);
NTSTATUS
WINAPI
ZwSetInformationObject
(
HANDLE
,
OBJECT_INFORMATION_CLASS
,
PVOID
,
ULONG
);
NTSTATUS
WINAPI
ZwSetInformationProcess
(
HANDLE
,
PROCESS
_INFORMATION_
CLASS
,
PVOID
,
ULONG
);
NTSTATUS
WINAPI
ZwSetInformationProcess
(
HANDLE
,
PROCESS
INFO
CLASS
,
PVOID
,
ULONG
);
NTSTATUS
WINAPI
ZwSetInformationThread
(
HANDLE
,
THREADINFOCLASS
,
LPCVOID
,
ULONG
);
NTSTATUS
WINAPI
ZwSetIoCompletion
(
HANDLE
,
ULONG
,
ULONG
,
NTSTATUS
,
ULONG
);
NTSTATUS
WINAPI
ZwSetLdtEntries
(
ULONG
,
ULONG
,
ULONG
,
ULONG
,
ULONG
,
ULONG
);
...
...
include/winbase.h
View file @
ce91ef64
...
...
@@ -1771,6 +1771,21 @@ typedef struct _WIN32_MEMORY_RANGE_ENTRY
SIZE_T
NumberOfBytes
;
}
WIN32_MEMORY_RANGE_ENTRY
,
*
PWIN32_MEMORY_RANGE_ENTRY
;
typedef
enum
_PROCESS_INFORMATION_CLASS
{
ProcessMemoryPriority
,
ProcessMemoryExhaustionInfo
,
ProcessAppMemoryInfo
,
ProcessInPrivateInfo
,
ProcessPowerThrottling
,
ProcessReservedValue1
,
ProcessTelemetryCoverageInfo
,
ProcessProtectionLevelInfo
,
ProcessLeapSecondInfo
,
ProcessMachineTypeInfo
,
ProcessInformationClassMax
}
PROCESS_INFORMATION_CLASS
;
WINBASEAPI
BOOL
WINAPI
ActivateActCtx
(
HANDLE
,
ULONG_PTR
*
);
WINADVAPI
BOOL
WINAPI
AddAccessAllowedAce
(
PACL
,
DWORD
,
DWORD
,
PSID
);
WINADVAPI
BOOL
WINAPI
AddAccessAllowedAceEx
(
PACL
,
DWORD
,
DWORD
,
DWORD
,
PSID
);
...
...
@@ -2689,6 +2704,7 @@ WINBASEAPI BOOL WINAPI SetPriorityClass(HANDLE,DWORD);
WINADVAPI
BOOL
WINAPI
SetPrivateObjectSecurity
(
SECURITY_INFORMATION
,
PSECURITY_DESCRIPTOR
,
PSECURITY_DESCRIPTOR
*
,
PGENERIC_MAPPING
,
HANDLE
);
WINADVAPI
BOOL
WINAPI
SetPrivateObjectSecurityEx
(
SECURITY_INFORMATION
,
PSECURITY_DESCRIPTOR
,
PSECURITY_DESCRIPTOR
*
,
ULONG
,
PGENERIC_MAPPING
,
HANDLE
);
WINBASEAPI
BOOL
WINAPI
SetProcessAffinityMask
(
HANDLE
,
DWORD_PTR
);
WINBASEAPI
BOOL
WINAPI
SetProcessInformation
(
HANDLE
,
PROCESS_INFORMATION_CLASS
,
LPVOID
,
DWORD
);
WINBASEAPI
BOOL
WINAPI
SetProcessPriorityBoost
(
HANDLE
,
BOOL
);
WINBASEAPI
BOOL
WINAPI
SetProcessShutdownParameters
(
DWORD
,
DWORD
);
WINBASEAPI
BOOL
WINAPI
SetProcessWorkingSetSize
(
HANDLE
,
SIZE_T
,
SIZE_T
);
...
...
include/winternl.h
View file @
ce91ef64
...
...
@@ -1574,12 +1574,14 @@ typedef enum _PROCESSINFOCLASS {
ProcessConsoleHostProcess
=
49
,
ProcessWindowInformation
=
50
,
ProcessHandleInformation
=
51
,
ProcessPowerThrottlingState
=
77
,
ProcessLeapSecondInformation
=
97
,
MaxProcessInfoClass
,
#ifdef __WINESRC__
ProcessWineMakeProcessSystem
=
1000
,
ProcessWineLdtCopy
,
#endif
}
PROCESSINFOCLASS
,
PROCESS_INFORMATION_CLASS
;
}
PROCESSINFOCLASS
;
#define MEM_EXECUTE_OPTION_DISABLE 0x01
#define MEM_EXECUTE_OPTION_ENABLE 0x02
...
...
@@ -4174,7 +4176,7 @@ NTSYSAPI NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULO
NTSYSAPI
NTSTATUS
WINAPI
NtSetInformationJobObject
(
HANDLE
,
JOBOBJECTINFOCLASS
,
PVOID
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetInformationKey
(
HANDLE
,
const
int
,
PVOID
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetInformationObject
(
HANDLE
,
OBJECT_INFORMATION_CLASS
,
PVOID
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetInformationProcess
(
HANDLE
,
PROCESS
_INFORMATION_
CLASS
,
PVOID
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetInformationProcess
(
HANDLE
,
PROCESS
INFO
CLASS
,
PVOID
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetInformationThread
(
HANDLE
,
THREADINFOCLASS
,
LPCVOID
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetInformationToken
(
HANDLE
,
TOKEN_INFORMATION_CLASS
,
PVOID
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
NtSetInformationVirtualMemory
(
HANDLE
,
VIRTUAL_MEMORY_INFORMATION_CLASS
,
ULONG_PTR
,
PMEMORY_RANGE_ENTRY
,
PVOID
,
ULONG
);
...
...
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