mirror of
https://github.com/bb107/MemoryModulePP
synced 2026-06-08 13:15:33 +00:00
Add support for thread pool(ntdll!TppWorkerThread)
This commit is contained in:
+22
-1
@@ -2,6 +2,8 @@
|
||||
#include "../MemoryModule/LoadDllMemoryApi.h"
|
||||
#include <cstdio>
|
||||
|
||||
//PMMP_GLOBAL_DATA MmpGlobalDataPtr = *(PMMP_GLOBAL_DATA*)GetProcAddress(GetModuleHandleA("MemoryModule.dll"), "MmpGlobalDataPtr");
|
||||
|
||||
static PVOID ReadDllFile(LPCSTR FileName) {
|
||||
LPVOID buffer;
|
||||
size_t size;
|
||||
@@ -130,8 +132,27 @@ void test_uef() {
|
||||
return;
|
||||
}
|
||||
|
||||
void Tp() {
|
||||
auto pool = CreateThreadpool(nullptr);
|
||||
if (pool) {
|
||||
|
||||
SetThreadpoolThreadMaximum(pool, 1);
|
||||
SetThreadpoolThreadMinimum(pool, 1);
|
||||
|
||||
Sleep(1000);
|
||||
|
||||
CloseThreadpool(pool);
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
test_uef();
|
||||
|
||||
DisplayStatus();
|
||||
test();
|
||||
|
||||
Tp();
|
||||
|
||||
WaitForSingleObject(NtCurrentProcess(), INFINITE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user