\r
static TCHAR unquoted_imagepath[PATH_LENGTH];\r
static TCHAR imagepath[PATH_LENGTH];\r
+static TCHAR imageargv0[PATH_LENGTH];\r
\r
/* Are two strings case-insensitively equivalent? */\r
int str_equiv(const TCHAR *a, const TCHAR *b) {\r
return imagepath;\r
}\r
\r
+const TCHAR *nssm_exe() {\r
+ return imageargv0;\r
+}\r
+\r
int _tmain(int argc, TCHAR **argv) {\r
check_console();\r
\r
if (get_imports()) exit(111);\r
\r
/* Remember our path for later. */\r
+ _sntprintf_s(imageargv0, _countof(imageargv0), _TRUNCATE, _T("%s"), argv[0]);\r
+ PathQuoteSpaces(imageargv0);\r
GetModuleFileName(0, unquoted_imagepath, _countof(unquoted_imagepath));\r
GetModuleFileName(0, imagepath, _countof(imagepath));\r
PathQuoteSpaces(imagepath);\r
int usage(int);\r
const TCHAR *nssm_unquoted_imagepath();\r
const TCHAR *nssm_imagepath();\r
+const TCHAR *nssm_exe();\r
\r
#define NSSM _T("NSSM")\r
#ifdef _WIN64\r