/* Create window */\r
HWND dlg = CreateDialog(0, MAKEINTRESOURCE(resource), 0, install_dlg);\r
if (! dlg) {\r
- snprintf(blurb, sizeof(blurb), "CreateDialog() failed with error code %d", GetLastError());\r
+ _snprintf(blurb, sizeof(blurb), "CreateDialog() failed with error code %d", GetLastError());\r
MessageBox(0, blurb, NSSM, MB_OK);\r
return 1;\r
}\r
\r
/* Confirm */\r
char blurb[MAX_PATH];\r
- if (snprintf(blurb, sizeof(blurb), "Remove the \"%s\" service?", name) < 0) {\r
+ if (_snprintf(blurb, sizeof(blurb), "Remove the \"%s\" service?", name) < 0) {\r
if (MessageBox(0, "Remove the service?", NSSM, MB_YESNO) != IDYES) return 0;\r
}\r
else if (MessageBox(0, blurb, NSSM, MB_YESNO) != IDYES) return 0;\r
#include <commctrl.h>\r
#include "resource.h"\r
\r
-#define GUI\r
-#ifndef snprintf\r
-#define snprintf _snprintf\r
-#endif\r
-\r
#define STRING_SIZE 256\r
\r
int nssm_gui(int, char *);\r
fprintf(stderr, "The full path to " NSSM " is too long!\n");\r
return 3;\r
}\r
- if (snprintf(command, sizeof(command), "\"%s\" %s", path, NSSM_RUN) < 0) {\r
+ if (_snprintf(command, sizeof(command), "\"%s\" %s", path, NSSM_RUN) < 0) {\r
fprintf(stderr, "Out of memory for ImagePath!\n");\r
return 4;\r
}\r
int ret = start_service();\r
if (ret) {\r
char code[16];\r
- snprintf(code, sizeof(code), "%d", ret);\r
+ _snprintf(code, sizeof(code), "%d", ret);\r
log_event(EVENTLOG_ERROR_TYPE, NSSM_EVENT_START_SERVICE_FAILED, exe, service_name, ret, 0);\r
return ret;\r
}\r