mirror of
https://github.com/donnaskiez/ac.git
synced 2024-11-21 22:24:08 +01:00
37 lines
No EOL
730 B
C++
37 lines
No EOL
730 B
C++
#include "module.h"
|
|
|
|
#include <Windows.h>
|
|
|
|
#include "client/message_queue.h"
|
|
#include "dispatcher/dispatcher.h"
|
|
|
|
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);
|
|
}
|
|
|
|
void
|
|
module::terminate()
|
|
{
|
|
} |