LookingGlass/host/main.cpp
Geoffrey McRae 01b10b3ee1 [host] converted program to a windows hidden/background user app.
NvFBC will not start when running as a service, likely intentional
security of the API to prevent it from being abused.
2017-11-01 03:23:46 +11:00

25 lines
426 B
C++

#include <Windows.h>
#include <tchar.h>
#include "common\debug.h"
#include "Service.h"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdParam, int iCmdShow)
{
#ifdef DEBUG
AllocConsole();
#endif
Service *svc = svc->Get();
if (!svc->Initialize())
{
DEBUG_ERROR("Failed to initialize service");
return -1;
}
while (true)
svc->Process();
svc->DeInitialize();
return 0;
}