From e437fc1db29fc193b11061c9c0e54f4b5fcc861e Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Mon, 28 Dec 2009 06:51:00 -0500 Subject: [PATCH] NSSM 2.1. --- README.txt | 16 +- gui.cpp | 4 +- gui.h | 2 +- nssm.h | 4 +- nssm.sln | 26 +++ nssm.vcproj | 639 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 684 insertions(+), 7 deletions(-) create mode 100644 nssm.sln create mode 100644 nssm.vcproj diff --git a/README.txt b/README.txt index 21718ba..84a34ba 100644 --- a/README.txt +++ b/README.txt @@ -1,5 +1,5 @@ NSSM: The Non-Sucking Service Manager -Version 2.0, 2006-09-09 +Version 2.1, 2009-12-28 by Benjamin Mayrargue (www.softlion.com) NSSM is a service helper program similar to srvany and cygrunsrv. It can start any application as an NT service and will restart the service if it @@ -7,9 +7,16 @@ fails for any reason. NSSM also has a graphical service installer and remover. +Full documentation can be found online at + + http://iain.cx/src/nssm/ + Since version 2.0, the GUI can be bypassed by entering all appropriate options on the command line. +Since version 2.1, NSSM can be compiled for x64 platforms. +Thanks Benjamin Mayrargue. + Usage ----- @@ -90,9 +97,14 @@ To remove the server: Building NSSM from source ------------------------- -NSSM is known to compile with Visual Studio 6 and Visual Studio 2005. +NSSM is known to compile with Visual Studio 6, Visual Studio 2005 and Visual +Studio 2008. +Credits +------- +Thanks to Benjamin Mayrargue (www.softlion.com) for adding 64-bit support. + Licence ------- NSSM is public domain. You may unconditionally use it and/or its source code diff --git a/gui.cpp b/gui.cpp index 5041acd..4461e8c 100644 --- a/gui.cpp +++ b/gui.cpp @@ -35,7 +35,7 @@ int nssm_gui(int resource, char *name) { DispatchMessage(&message); } - return message.wParam; + return (int) message.wParam; } void centre_window(HWND window) { @@ -179,7 +179,7 @@ void browse(HWND window) { } /* Install/remove dialogue callback */ -int CALLBACK install_dlg(HWND window, UINT message, WPARAM w, LPARAM l) { +INT_PTR CALLBACK install_dlg(HWND window, UINT message, WPARAM w, LPARAM l) { switch (message) { /* Creating the dialogue */ case WM_INITDIALOG: diff --git a/gui.h b/gui.h index 0e589f4..d9c378b 100644 --- a/gui.h +++ b/gui.h @@ -18,6 +18,6 @@ void centre_window(HWND); int install(HWND); int remove(HWND); void browse(HWND); -int CALLBACK install_dlg(HWND, UINT, WPARAM, LPARAM); +INT_PTR CALLBACK install_dlg(HWND, UINT, WPARAM, LPARAM); #endif diff --git a/nssm.h b/nssm.h index 0837126..ac4c246 100644 --- a/nssm.h +++ b/nssm.h @@ -13,8 +13,8 @@ int str_equiv(const char *, const char *); #define NSSM "nssm" -#define NSSM_VERSION "2.0" -#define NSSM_DATE "2006-09-09" +#define NSSM_VERSION "2.1" +#define NSSM_DATE "2009-12-28" #define NSSM_RUN "run" #endif diff --git a/nssm.sln b/nssm.sln new file mode 100644 index 0000000..a59b655 --- /dev/null +++ b/nssm.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nssm", "nssm.vcproj", "{32995E05-606F-4D83-A2E6-C2B361B34DF1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {32995E05-606F-4D83-A2E6-C2B361B34DF1}.Debug|Win32.ActiveCfg = Debug|Win32 + {32995E05-606F-4D83-A2E6-C2B361B34DF1}.Debug|Win32.Build.0 = Debug|Win32 + {32995E05-606F-4D83-A2E6-C2B361B34DF1}.Debug|x64.ActiveCfg = Debug|x64 + {32995E05-606F-4D83-A2E6-C2B361B34DF1}.Debug|x64.Build.0 = Debug|x64 + {32995E05-606F-4D83-A2E6-C2B361B34DF1}.Release|Win32.ActiveCfg = Release|Win32 + {32995E05-606F-4D83-A2E6-C2B361B34DF1}.Release|Win32.Build.0 = Release|Win32 + {32995E05-606F-4D83-A2E6-C2B361B34DF1}.Release|x64.ActiveCfg = Release|x64 + {32995E05-606F-4D83-A2E6-C2B361B34DF1}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/nssm.vcproj b/nssm.vcproj new file mode 100644 index 0000000..4bd08c5 --- /dev/null +++ b/nssm.vcproj @@ -0,0 +1,639 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.7.4