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
EXPORTS
AcquireSRWLockExclusive @1
AcquireSRWLockShared @2
EnterCriticalSection @87
GetProcessHeap @199
RtlCaptureContext @378
XMemAlloc @501
AcquireSRWLockExclusive = AcquireSRWLockExclusive_X @1
AcquireSRWLockShared = AcquireSRWLockShared_X @2
EnterCriticalSection = EnterCriticalSection_X @87
GetProcessHeap = GetProcessHeap_X @199
RtlCaptureContext = RtlCaptureContext_X @378
XMemAlloc = XMemAlloc_X @501

View File

@ -20,36 +20,38 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD forwardReason, LPVOID lpvReserved
return TRUE;
}
void AcquireSRWLockExclusive(PSRWLOCK SRWLock)
void AcquireSRWLockExclusive_X(PSRWLOCK SRWLock)
{
AcquireSRWLockExclusive(SRWLock);
}
void AcquireSRWLockShared(PSRWLOCK SRWLock)
{
}
void EnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
{
}
HANDLE GetProcessHeap()
{
return nullptr;
}
NTSYSAPI VOID RtlCaptureContext(PCONTEXT ContextRecord)
void AcquireSRWLockShared_X(PSRWLOCK SRWLock)
{
AcquireSRWLockShared(SRWLock);
}
void EnterCriticalSection_X(LPCRITICAL_SECTION lpCriticalSection)
{
EnterCriticalSection(lpCriticalSection);
}
HANDLE GetProcessHeap_X()
{
return GetProcessHeap();
}
/*
NTSYSAPI VOID RtlCaptureContext_X(PCONTEXT ContextRecord)
{
}
*/
// dwSize - size of allocated memory block that was requested.
// dwAttributes - allocated memory block attributes.
//
// 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);
}