Added the AcquireSRWLockExclusive, AcquireSRWLockShared, EnterCriticalSection, and GetProcessHeap.

This commit is contained in:
Tyler Jaacks 2024-09-03 23:05:57 -05:00
parent 88a6cda95c
commit 8f70d9782c
2 changed files with 28 additions and 26 deletions

View File

@ -1,8 +1,8 @@
LIBRARY kernelx LIBRARY kernelx
EXPORTS EXPORTS
AcquireSRWLockExclusive @1 AcquireSRWLockExclusive = AcquireSRWLockExclusive_X @1
AcquireSRWLockShared @2 AcquireSRWLockShared = AcquireSRWLockShared_X @2
EnterCriticalSection @87 EnterCriticalSection = EnterCriticalSection_X @87
GetProcessHeap @199 GetProcessHeap = GetProcessHeap_X @199
RtlCaptureContext @378 RtlCaptureContext = RtlCaptureContext_X @378
XMemAlloc @501 XMemAlloc = XMemAlloc_X @501

View File

@ -20,36 +20,38 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD forwardReason, LPVOID lpvReserved
return TRUE; return TRUE;
} }
void AcquireSRWLockExclusive(PSRWLOCK SRWLock) void AcquireSRWLockExclusive_X(PSRWLOCK SRWLock)
{ {
AcquireSRWLockExclusive(SRWLock);
} }
void AcquireSRWLockShared(PSRWLOCK SRWLock) void AcquireSRWLockShared_X(PSRWLOCK SRWLock)
{ {
AcquireSRWLockShared(SRWLock);
} }
void EnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection) void EnterCriticalSection_X(LPCRITICAL_SECTION lpCriticalSection)
{ {
EnterCriticalSection(lpCriticalSection);
} }
HANDLE GetProcessHeap() HANDLE GetProcessHeap_X()
{ {
return nullptr; return GetProcessHeap();
} }
NTSYSAPI VOID RtlCaptureContext(PCONTEXT ContextRecord) /*
NTSYSAPI VOID RtlCaptureContext_X(PCONTEXT ContextRecord)
{ {
} }
*/
// dwSize - size of allocated memory block that was requested. // dwSize - size of allocated memory block that was requested.
// dwAttributes - allocated memory block attributes. // dwAttributes - allocated memory block attributes.
// //
// returns a pointer allocated memory block. // returns a pointer allocated memory block.
PVOID XMemAlloc(SIZE_T dwSize, ULONGLONG dwAttributes) PVOID XMemAlloc_X(SIZE_T dwSize, ULONGLONG dwAttributes)
{ {
return nullptr; return VirtualAlloc(nullptr, dwSize, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
} }