\r
extern unsigned long tls_index;\r
extern bool is_admin;\r
+extern imports_t imports;\r
\r
/* String function */\r
int str_equiv(const char *a, const char *b) {\r
This will save time when running with no arguments from a command prompt.\r
*/\r
if (_fileno(stdin) < 0) {\r
+ /* Set up function pointers. */\r
+ if (get_imports()) exit(111);\r
+\r
/* Start service magic */\r
SERVICE_TABLE_ENTRY table[] = { { NSSM, service_main }, { 0, 0 } };\r
if (! StartServiceCtrlDispatcher(table)) {\r
/* User probably ran nssm with no argument */\r
if (error == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) exit(usage(1));\r
log_event(EVENTLOG_ERROR_TYPE, NSSM_EVENT_DISPATCHER_FAILED, error_string(error), 0);\r
+ free_imports();\r
exit(100);\r
}\r
}\r