diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c index dfaf69a5385..610cff08388 100644 --- a/dlls/kernel32/heap.c +++ b/dlls/kernel32/heap.c @@ -287,7 +287,7 @@ LPVOID WINAPI HeapReAlloc( HANDLE heap, DWORD flags, LPVOID ptr, SIZE_T size ) return RtlReAllocateHeap( heap, flags, ptr, size ); } -SIZE_T WINAPI HeapSize( HANDLE heap, DWORD flags, LPVOID ptr ) +SIZE_T WINAPI HeapSize( HANDLE heap, DWORD flags, LPCVOID ptr ) { return RtlSizeHeap( heap, flags, ptr ); } diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 25aefd9f3ae..571dd23a4e2 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -1511,7 +1511,7 @@ BOOLEAN WINAPI RtlUnlockHeap( HANDLE heap ) * NOTES * The size may be bigger than what was passed to RtlAllocateHeap(). */ -SIZE_T WINAPI RtlSizeHeap( HANDLE heap, ULONG flags, PVOID ptr ) +SIZE_T WINAPI RtlSizeHeap( HANDLE heap, ULONG flags, const void *ptr ) { SIZE_T ret; HEAP *heapPtr = HEAP_GetPtr( heap ); @@ -1531,7 +1531,7 @@ SIZE_T WINAPI RtlSizeHeap( HANDLE heap, ULONG flags, PVOID ptr ) } else { - ARENA_INUSE *pArena = (ARENA_INUSE *)ptr - 1; + const ARENA_INUSE *pArena = (const ARENA_INUSE *)ptr - 1; ret = (pArena->size & ARENA_SIZE_MASK) - pArena->unused_bytes; } if (!(flags & HEAP_NO_SERIALIZE)) RtlLeaveCriticalSection( &heapPtr->critSection ); diff --git a/include/winbase.h b/include/winbase.h index da9c547bacd..c45fbf119f3 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -1742,7 +1742,7 @@ BOOL WINAPI HeapLock(HANDLE); LPVOID WINAPI HeapReAlloc(HANDLE,DWORD,LPVOID,SIZE_T); BOOL WINAPI HeapQueryInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T,PSIZE_T); BOOL WINAPI HeapSetInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T); -SIZE_T WINAPI HeapSize(HANDLE,DWORD,LPVOID); +SIZE_T WINAPI HeapSize(HANDLE,DWORD,LPCVOID); BOOL WINAPI HeapUnlock(HANDLE); BOOL WINAPI HeapValidate(HANDLE,DWORD,LPCVOID); BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY); diff --git a/include/winternl.h b/include/winternl.h index 1dc60115576..fa3696f5988 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2193,7 +2193,7 @@ void WINAPI RtlSetLastWin32Error(DWORD); void WINAPI RtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS); NTSTATUS WINAPI RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN); NTSTATUS WINAPI RtlSetTimeZoneInformation(const RTL_TIME_ZONE_INFORMATION*); -SIZE_T WINAPI RtlSizeHeap(HANDLE,ULONG,PVOID); +SIZE_T WINAPI RtlSizeHeap(HANDLE,ULONG,const void*); NTSTATUS WINAPI RtlStringFromGUID(REFGUID,PUNICODE_STRING); LPDWORD WINAPI RtlSubAuthoritySid(PSID,DWORD); LPBYTE WINAPI RtlSubAuthorityCountSid(PSID);