nssm.h 852 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef NSSM_H
  2. #define NSSM_H
  3. #define _WIN32_WINNT 0x0500
  4. #include <stdarg.h>
  5. #include <stdio.h>
  6. #include <windows.h>
  7. #include "event.h"
  8. #include "messages.h"
  9. #include "registry.h"
  10. #include "service.h"
  11. #include "gui.h"
  12. int str_equiv(const char *, const char *);
  13. #define NSSM "nssm"
  14. #define NSSM_VERSION "2.5"
  15. #define NSSM_DATE "2010-09-25"
  16. #define NSSM_RUN "run"
  17. /*
  18. MSDN says the commandline in CreateProcess() is limited to 32768 characters
  19. and the application name to MAX_PATH.
  20. A registry key is limited to 255 characters.
  21. A registry value is limited to 16383 characters.
  22. Therefore we limit the service name to accommodate the path under HKLM.
  23. */
  24. #define EXE_LENGTH MAX_PATH
  25. #define CMD_LENGTH 32768
  26. #define KEY_LENGTH 255
  27. #define VALUE_LENGTH 16383
  28. #define SERVICE_NAME_LENGTH KEY_LENGTH - 55
  29. #endif