2024-01-21 08:22:06 +01:00
|
|
|
#include "module.h"
|
|
|
|
|
|
|
|
#include <Windows.h>
|
|
|
|
|
|
|
|
#include "client/message_queue.h"
|
|
|
|
#include "dispatcher/dispatcher.h"
|
|
|
|
|
2024-03-04 05:12:44 +01:00
|
|
|
void
|
|
|
|
module::run(HINSTANCE hinstDLL)
|
|
|
|
{
|
|
|
|
#if DEBUG
|
|
|
|
AllocConsole();
|
|
|
|
FILE* file;
|
|
|
|
freopen_s(&file, "CONOUT$", "w", stdout);
|
|
|
|
freopen_s(&file, "CONIN$", "r", stdin);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
LPTSTR pipe_name = (LPTSTR)L"\\\\.\\pipe\\DonnaACPipe";
|
|
|
|
LPCWSTR driver_name = L"\\\\.\\DonnaAC";
|
|
|
|
|
|
|
|
client::message_queue queue(pipe_name);
|
|
|
|
dispatcher::dispatcher dispatch(driver_name, queue);
|
|
|
|
dispatch.run();
|
|
|
|
|
|
|
|
#if DEBUG
|
|
|
|
fclose(stdout);
|
|
|
|
fclose(stdin);
|
|
|
|
FreeConsole();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
FreeLibraryAndExitThread(hinstDLL, 0);
|
2024-01-21 08:22:06 +01:00
|
|
|
}
|
|
|
|
|
2024-03-04 05:12:44 +01:00
|
|
|
void
|
|
|
|
module::terminate()
|
2024-01-21 08:22:06 +01:00
|
|
|
{
|
|
|
|
}
|