-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTightVNCAssist.cpp
52 lines (40 loc) · 1.64 KB
/
TightVNCAssist.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// TightVNCAssist.cpp : Defines the entry point for the application.
//
//#include "framework.h"
//#include "TightVNCAssist.h"
#include "util/CommonHeader.h"
#include "util/winhdr.h"
#include "util/CommandLine.h"
#include "win-system/WinCommandLineArgs.h"
#include "tvnserver-app/TvnService.h"
#include "TvnAssistApp.h"
#include "tvnserver-app/QueryConnectionApplication.h"
#include "tvnserver-app/DesktopServerApplication.h"
#include "tvnserver-app/AdditionalActionApplication.h"
#include "tvnserver-app/ServiceControlApplication.h"
#include "tvnserver-app/ServiceControlCommandLine.h"
#include "tvnserver-app/QueryConnectionCommandLine.h"
#include "tvnserver-app/DesktopServerCommandLine.h"
#include "tvncontrol-app/ControlApplication.h"
#include "tvncontrol-app/ControlCommandLine.h"
#include "tvnserver/resource.h"
#include "tvnserver-app/CrashHook.h"
#include "tvnserver-app/NamingDefs.h"
#include "tvnserver-app/WinEventLogWriter.h"
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
{
LogWriter preLog(0);
// Life time of the sysLog must be greater than a TvnService object
// because the crashHook uses it but fully functional usage possible
// only after the TvnService object start.
WinEventLogWriter winEventLogWriter(&preLog);
CrashHook crashHook(&winEventLogWriter);
ResourceLoader resourceLoaderSingleton(hInstance);
// No additional applications, run TightVNC server as single application.
crashHook.setGuiEnabled();
TvnAssistApp tvnServer(hInstance,
WindowNames::WINDOW_CLASS_NAME,
lpCmdLine, &winEventLogWriter);
return tvnServer.run();
}