From d2287eff0393519afbdbcfb6539669344c8f1fd0 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <[email protected]>
Date: Sun, 4 Jul 2021 21:20:13 +0530
Subject: [PATCH 1/2] headers: Move Get/SetProcessInformation from winbase.h to 
processthredsapi.h

Signed-off-by: Biswapriyo Nath <[email protected]>
---
 mingw-w64-headers/include/processthreadsapi.h | 20 +++++++++++++++++++
 mingw-w64-headers/include/winbase.h           | 17 ----------------
 2 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/mingw-w64-headers/include/processthreadsapi.h 
b/mingw-w64-headers/include/processthreadsapi.h
index 8889151..a486343 100644
--- a/mingw-w64-headers/include/processthreadsapi.h
+++ b/mingw-w64-headers/include/processthreadsapi.h
@@ -99,8 +99,28 @@ extern "C" {
     DWORD dwProcessId;
     DWORD dwThreadId;
   } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
+
+  typedef enum _PROCESS_INFORMATION_CLASS {
+    ProcessMemoryPriority,
+    ProcessMemoryExhaustionInfo,
+    ProcessAppMemoryInfo,
+    ProcessInPrivateInfo,
+    ProcessPowerThrottling,
+    ProcessReservedValue1,
+    ProcessTelemetryCoverageInfo,
+    ProcessProtectionLevelInfo,
+    ProcessLeapSecondInfo,
+    ProcessMachineTypeInfo,
+    ProcessInformationClassMax
+  } PROCESS_INFORMATION_CLASS;
+
+#if _WIN32_WINNT >= 0x0602
+  WINBASEAPI WINBOOL WINAPI GetProcessInformation (HANDLE hProcess, 
PROCESS_INFORMATION_CLASS ProcessInformationClass, LPVOID ProcessInformation, 
DWORD ProcessInformationSize);
+  WINBASEAPI WINBOOL WINAPI SetProcessInformation (HANDLE hProcess, 
PROCESS_INFORMATION_CLASS ProcessInformationClass, LPVOID ProcessInformation, 
DWORD ProcessInformationSize);
 #endif
 
+#endif /* WINAPI_PARTITION_APP */
+
 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
 
   typedef struct _PROC_THREAD_ATTRIBUTE_LIST *PPROC_THREAD_ATTRIBUTE_LIST, 
*LPPROC_THREAD_ATTRIBUTE_LIST;
diff --git a/mingw-w64-headers/include/winbase.h 
b/mingw-w64-headers/include/winbase.h
index 08f8977..cc29351 100644
--- a/mingw-w64-headers/include/winbase.h
+++ b/mingw-w64-headers/include/winbase.h
@@ -1594,25 +1594,8 @@ extern "C" {
 #endif
 #endif
 
-#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
-  typedef enum _PROCESS_INFORMATION_CLASS {
-    ProcessMemoryPriority,
-    ProcessMemoryExhaustionInfo,
-    ProcessAppMemoryInfo,
-    ProcessInPrivateInfo,
-    ProcessPowerThrottling,
-    ProcessReservedValue1,
-    ProcessTelemetryCoverageInfo,
-    ProcessProtectionLevelInfo,
-    ProcessLeapSecondInfo,
-    ProcessInformationClassMax
-  } PROCESS_INFORMATION_CLASS;
-#endif
-
 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) && _WIN32_WINNT >= 0x0602
   WINBASEAPI HMODULE WINAPI LoadPackagedLibrary (LPCWSTR lpwLibFileName, DWORD 
Reserved);
-  WINBASEAPI WINBOOL WINAPI GetProcessInformation (HANDLE hProcess, 
PROCESS_INFORMATION_CLASS ProcessInformationClass, LPVOID ProcessInformation, 
DWORD ProcessInformationSize);
-  WINBASEAPI WINBOOL WINAPI SetProcessInformation (HANDLE hProcess, 
PROCESS_INFORMATION_CLASS ProcessInformationClass, LPVOID ProcessInformation, 
DWORD ProcessInformationSize);
 #endif
 
 #if _WIN32_WINNT >= 0x0600
-- 
2.32.0

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to