MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / _tmain

Function _tmain

IntelPresentMon/PresentMonService/ServiceMain.cpp:72–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72int __cdecl _tmain(int argc, TCHAR* argv[])
73{
74 const SERVICE_TABLE_ENTRY dispatchTable[] = {
75 {serviceName, static_cast<LPSERVICE_MAIN_FUNCTION>(ServiceMainCallback)},
76 {NULL, NULL}
77 };
78
79 if (!StartServiceCtrlDispatcher(dispatchTable)) {
80 // if registration fails with ERROR_FAILED_SERVICE_CONTROLLER_CONNECT
81 // this usually means we're running as console application
82 if (GetLastError() == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) {
83 return CommonEntry(argc, argv, true);
84 }
85 return -1;
86 }
87
88 return 0;
89}

Callers

nothing calls this directly

Calls 1

CommonEntryFunction · 0.85

Tested by

no test coverage detected