mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:05:43 +00:00
- Hackplement RtlSetUserValueHeap and RtlGetUserInfoHeap, they are needed for being able to build higher-level heap management around the Heap APIs (either for developers or the OS). Case in point, needed for my Global* rewrite in kernel32. The current APIs are utter hacks, but they work (eventually we should get rid of the Wine Windows 95 heap implementation and replace it).
svn path=/trunk/; revision=22552
This commit is contained in:
parent
8cd72eb3cd
commit
6f34173bc0
3 changed files with 58 additions and 2 deletions
|
@ -482,7 +482,7 @@ RtlGetProcessHeaps@8
|
|||
RtlGetSaclSecurityDescriptor@16
|
||||
RtlGetSecurityDescriptorRMControl@8
|
||||
RtlGetSetBootStatusData@24
|
||||
;RtlGetUserInfoHeap
|
||||
RtlGetUserInfoHeap@20
|
||||
RtlGetVersion@4
|
||||
RtlHashUnicodeString@16
|
||||
RtlIdentifierAuthoritySid@4
|
||||
|
@ -638,7 +638,7 @@ RtlSetSecurityObject@20
|
|||
RtlSetTimeZoneInformation@4
|
||||
;RtlSetUnicodeCallouts
|
||||
;RtlSetUserFlagsHeap
|
||||
;RtlSetUserValueHeap
|
||||
RtlSetUserValueHeap@16
|
||||
RtlSizeHeap@12
|
||||
RtlSplay@4
|
||||
;RtlStartRXact
|
||||
|
|
|
@ -496,6 +496,16 @@ RtlGetProcessHeaps(
|
|||
HANDLE *HeapArray
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlGetUserInfoHeap(
|
||||
IN PVOID HeapHandle,
|
||||
IN ULONG Flags,
|
||||
IN PVOID BaseAddress,
|
||||
OUT PVOID *UserValue,
|
||||
OUT PULONG UserFlags
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
PVOID
|
||||
NTAPI
|
||||
|
@ -516,6 +526,15 @@ BOOLEAN
|
|||
NTAPI
|
||||
RtlUnlockHeap(IN HANDLE Heap);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlSetUserValueHeap(
|
||||
IN PVOID HeapHandle,
|
||||
IN ULONG Flags,
|
||||
IN PVOID BaseAddress,
|
||||
IN PVOID UserValue
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
|
|
|
@ -100,6 +100,7 @@ typedef struct tagHEAP
|
|||
RTL_CRITICAL_SECTION critSection; /* Critical section for serialization */
|
||||
ULONG flags; /* Heap flags */
|
||||
ULONG magic; /* Magic number */
|
||||
PVOID UserValue;
|
||||
PRTL_HEAP_COMMIT_ROUTINE commitRoutine;
|
||||
}
|
||||
HEAP, *PHEAP;
|
||||
|
@ -1843,4 +1844,40 @@ RtlZeroHeap(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlSetUserValueHeap(IN PVOID HeapHandle,
|
||||
IN ULONG Flags,
|
||||
IN PVOID BaseAddress,
|
||||
IN PVOID UserValue)
|
||||
{
|
||||
HEAP *heapPtr = HEAP_GetPtr(HeapHandle);
|
||||
|
||||
/* Hack */
|
||||
heapPtr->UserValue = UserValue;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlGetUserInfoHeap(IN PVOID HeapHandle,
|
||||
IN ULONG Flags,
|
||||
IN PVOID BaseAddress,
|
||||
OUT PVOID *UserValue,
|
||||
OUT PULONG UserFlags)
|
||||
{
|
||||
HEAP *heapPtr = HEAP_GetPtr(HeapHandle);
|
||||
|
||||
/* Hack */
|
||||
if (UserValue) *UserValue = heapPtr->UserValue;
|
||||
if (UserFlags) *UserFlags = heapPtr->flags & HEAP_SETTABLE_USER_FLAGS;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue