mirror-ac/user/um/umanager.cpp

37 lines
860 B
C++
Raw Normal View History

2023-08-17 10:45:50 +02:00
#include "umanager.h"
#include "../common.h"
#include "process.h"
#include "../um/imports.h"
#include <TlHelp32.h>
2023-08-22 19:32:25 +02:00
usermode::UManager::UManager( std::shared_ptr<global::ThreadPool> ThreadPool, std::shared_ptr<global::Client> ReportInterface )
2023-08-17 10:45:50 +02:00
{
this->thread_pool = ThreadPool;
2023-08-18 07:33:13 +02:00
this->process = std::make_unique<Process>(ReportInterface);
2023-08-17 10:45:50 +02:00
}
usermode::UManager::~UManager()
{
/* Wait for our jobs to be finished, then safely stop our pool */
2023-08-19 04:52:57 +02:00
//while ( true )
//{
// if ( this->thread_pool->Busy() == FALSE )
// {
// this->thread_pool->Stop();
// break;
// }
//}
2023-08-17 10:45:50 +02:00
}
void usermode::UManager::ValidateProcessThreads()
{
this->thread_pool->QueueJob( [ this ]() {this->process->ValidateProcessThreads(); } );
}
void usermode::UManager::ValidateProcessMemory()
{
this->thread_pool->QueueJob( [ this ]() {this->process->ScanProcessMemory(); } );
}