Apologies, I am using gmail and was born too late to have learned how
to use a mailing list 😅

From 758f4b203d8dc42ef19910d226eeb735f5dc15d6 Mon Sep 17 00:00:00 2001
From: Duncan Ogilvie <mr.exodia.tp...@gmail.com>
Date: Sat, 4 Jan 2025 02:34:26 +0100
Subject: [PATCH] Fix a few return types in winnt.h

---
 mingw-w64-headers/include/winnt.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mingw-w64-headers/include/winnt.h
b/mingw-w64-headers/include/winnt.h
index b6d1f58ed..2781198fa 100644
--- a/mingw-w64-headers/include/winnt.h
+++ b/mingw-w64-headers/include/winnt.h
@@ -9705,10 +9705,10 @@ typedef DWORD (WINAPI
*PRTL_RUN_ONCE_INIT_FN)(PRTL_RUN_ONCE, PVOID, PVOID *);
 #define VERIFIER_STOP(Code,Msg,P1,S1,P2,S2,P3,S3,P4,S4) {
RtlApplicationVerifierStop
((Code),(Msg),(ULONG_PTR)(P1),(S1),(ULONG_PTR)(P2),(S2),(ULONG_PTR)(P3),(S3),(ULONG_PTR)(P4),(S4));
}

     VOID NTAPI RtlApplicationVerifierStop(ULONG_PTR Code,PSTR
Message,ULONG_PTR Param1,PSTR Description1,ULONG_PTR Param2,PSTR
Description2,ULONG_PTR Param3,PSTR Description3,ULONG_PTR Param4,PSTR
Description4);
-    NTSYSAPI DWORD NTAPI RtlSetHeapInformation(PVOID
HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID
HeapInformation,SIZE_T HeapInformationLength);
-    NTSYSAPI DWORD NTAPI RtlQueryHeapInformation(PVOID
HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID
HeapInformation,SIZE_T HeapInformationLength,PSIZE_T ReturnLength);
-    DWORD NTAPI RtlMultipleAllocateHeap(PVOID HeapHandle,DWORD
Flags,SIZE_T Size,DWORD Count,PVOID *Array);
-    DWORD NTAPI RtlMultipleFreeHeap(PVOID HeapHandle,DWORD
Flags,DWORD Count,PVOID *Array);
+    NTSYSAPI LONG NTAPI RtlSetHeapInformation(PVOID
HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID
HeapInformation,SIZE_T HeapInformationLength);
+    NTSYSAPI LONG NTAPI RtlQueryHeapInformation(PVOID
HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID
HeapInformation,SIZE_T HeapInformationLength,PSIZE_T ReturnLength);
+    ULONG NTAPI RtlMultipleAllocateHeap(PVOID HeapHandle,DWORD
Flags,SIZE_T Size,DWORD Count,PVOID *Array);
+    ULONG NTAPI RtlMultipleFreeHeap(PVOID HeapHandle,DWORD
Flags,DWORD Count,PVOID *Array);

     typedef struct _HARDWARE_COUNTER_DATA {
       HARDWARE_COUNTER_TYPE Type;
-- 
2.47.0.windows.2

Also opened a merge request on SourceForge, but they don't appear to be used?

Thanks,

Duncan

On Sat, 4 Jan 2025 at 02:44, LIU Hao <lh_mo...@126.com> wrote:
>
> 在 2025-01-04 09:39, Duncan Ogilvie 写道:
> > Today I was trying to use System Informer's phnt headers with mingw-w64.
> > There are some missing headers and other minor issues, but I can work
> > around them. Unfortunately it was not possible to work around a few errors
> > related to incorrect function declarations related to heap management.
> >
> > Attached a patch. The return type should be NTSTATUS, but this isn't
> > available in winnt.h, so I used LONG, which is what NTSTATUS is. I
> > cross-referenced with Wine, ReactOS and they all match my patched return
> > types.
>
> There was no attachment..? Please send patches as TXT files. Thanks.
>
>
> --
> Best regards,
> LIU Hao


_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to