init
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
#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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user