51 lines
858 B
C++
51 lines
858 B
C++
#include "comm.h"
|
|
#include "Driver.h"
|
|
#include "Mapping.h"
|
|
|
|
HANDLE hMapHandle;
|
|
|
|
namespace comm
|
|
{
|
|
auto coom_call_back(LPVOID parmar)-> DWORD
|
|
{
|
|
while (true)
|
|
{
|
|
auto mapping_data = reinterpret_cast<PMAPPING_USER_MEMORY>(parmar);
|
|
if (mapping_data->add_index_code)
|
|
{
|
|
mapping_data->Index++;
|
|
strcpy_s(mapping_data->str, "ok");
|
|
|
|
mapping_data->add_index_code = FALSE;
|
|
}
|
|
if (mapping_data->load_driver_code)
|
|
{
|
|
auto suc = Driver::fn_get_instance()->driver_install();
|
|
|
|
mapping_data->bIsSuc = suc;
|
|
strcpy_s(mapping_data->str, "ok");
|
|
|
|
|
|
mapping_data->load_driver_code = FALSE;
|
|
|
|
exit(0);
|
|
}
|
|
|
|
//ZeroMemory(mapping_data, sizeof(MAPPING_USER_MEMORY));
|
|
|
|
Sleep(500);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
auto create_coomback(LPVOID parmar) -> void
|
|
{
|
|
|
|
CreateThread(nullptr, 0, coom_call_back, parmar, 0, nullptr);
|
|
}
|
|
|
|
|
|
}
|