nssm.h 874 B

1234567891011121314151617181920212223242526272829303132333435
  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 "process.h"
  10. #include "registry.h"
  11. #include "service.h"
  12. #include "gui.h"
  13. int str_equiv(const char *, const char *);
  14. #define NSSM "nssm"
  15. #define NSSM_VERSION "2.6"
  16. #define NSSM_DATE "2010-11-19"
  17. #define NSSM_RUN "run"
  18. /*
  19. MSDN says the commandline in CreateProcess() is limited to 32768 characters
  20. and the application name to MAX_PATH.
  21. A registry key is limited to 255 characters.
  22. A registry value is limited to 16383 characters.
  23. Therefore we limit the service name to accommodate the path under HKLM.
  24. */
  25. #define EXE_LENGTH MAX_PATH
  26. #define CMD_LENGTH 32768
  27. #define KEY_LENGTH 255
  28. #define VALUE_LENGTH 16383
  29. #define SERVICE_NAME_LENGTH KEY_LENGTH - 55
  30. #endif