Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.3 KiB

  1. /*++
  2. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3. ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5. PARTICULAR PURPOSE.
  6. Copyright (c) 1995-1998 Microsoft Corporation
  7. Module Name:
  8. service.h
  9. Abstract:
  10. Defines programming model for Windows CE Services
  11. Notes:
  12. --*/
  13. #if ! defined (__service_H__)
  14. #define __service_H__ 1
  15. #ifdef OLD_CE_BUILD
  16. // We have to make a private copy of it here because we can't include
  17. // \public\common\oak\inc without seriously confusing VC.
  18. #define FILE_DEVICE_SERVICE 0x00000104
  19. #endif
  20. #include <winioctl.h>
  21. //
  22. // Return codes
  23. //
  24. #define SERVICE_SUCCESS 0
  25. //
  26. // Service states
  27. //
  28. #define SERVICE_STATE_OFF 0
  29. #define SERVICE_STATE_ON 1
  30. #define SERVICE_STATE_STARTING_UP 2
  31. #define SERVICE_STATE_SHUTTING_DOWN 3
  32. //
  33. // Service is interfaced via series of IOCTL calls that define service life cycle.
  34. // Actual implementation is service-specific.
  35. //
  36. //
  37. // Start the service that has been in inactive state. Return code: SERVICE_SUCCESS or error code.
  38. //
  39. #define IOCTL_SERVICE_START CTL_CODE(FILE_DEVICE_SERVICE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
  40. //
  41. // Stop service, but do not unload service's DLL
  42. //
  43. #define IOCTL_SERVICE_STOP CTL_CODE(FILE_DEVICE_SERVICE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
  44. //
  45. // Refresh service's state from registry or other configuration storage
  46. //
  47. #define IOCTL_SERVICE_REFRESH CTL_CODE(FILE_DEVICE_SERVICE, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
  48. //
  49. // Have service configure its registry for auto-load
  50. //
  51. #define IOCTL_SERVICE_INSTALL CTL_CODE(FILE_DEVICE_SERVICE, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
  52. //
  53. // Remove registry configuration
  54. //
  55. #define IOCTL_SERVICE_UNINSTALL CTL_CODE(FILE_DEVICE_SERVICE, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
  56. //
  57. // Unload the service which should be stopped.
  58. //
  59. #define IOCTL_SERVICE_UNLOAD CTL_CODE(FILE_DEVICE_SERVICE, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
  60. //
  61. // Supply a configuration or command string and code to the service.
  62. //
  63. #define IOCTL_SERVICE_CONTROL CTL_CODE(FILE_DEVICE_SERVICE, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
  64. //
  65. // Return service status.
  66. //
  67. #define IOCTL_SERVICE_STATUS CTL_CODE(FILE_DEVICE_SERVICE, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
  68. #endif /* __service_H__ */