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.

111 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. bosvc.h
  5. Abstract:
  6. Header file for definitions and structure for a generic backoffice
  7. server cluster resource dll.
  8. Author:
  9. Sunita Shrivastava (sunitas) 23-June-1997
  10. Revision History:
  11. --*/
  12. #ifndef _BOSVC_H
  13. #define _BOSVC_H
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. //defines
  18. #define LOCAL_SERVICES L"System\\CurrentControlSet\\Services"
  19. #define MAX_INDEPENDENT_SERVICES 5
  20. #define MAX_PROVIDOR_SERVICES 3
  21. /*
  22. #define ClusResLogEventByKeyData(_hKey_, _level_, _msgid_, dwBytes, pData) \
  23. ClusResLogEventWithName0(_hKey_, \
  24. _level_, \
  25. LOG_CURRENT_MODULE, \
  26. __FILE__, \
  27. __LINE__, \
  28. _msgid_, \
  29. 0, \
  30. NULL)
  31. */
  32. //
  33. //typdefs
  34. //
  35. typedef WCHAR SERVICE_NAME[32];
  36. typedef SERVICE_NAME *PSERVICE_NAME;
  37. //the main services start atmost 2 levels deep in the service dependency tree
  38. //leaf is at level 0
  39. typedef struct _SERVICE_INFO{
  40. SERVICE_NAME snSvcName;
  41. DWORD dwDependencyCnt;
  42. SERVICE_NAME snProvidorSvc[MAX_PROVIDOR_SERVICES];
  43. }SERVICE_INFO, *PSERVICE_INFO;
  44. //at most we can start 10 independent services
  45. typedef struct _SERVICE_INFOLIST{
  46. DWORD dwMaxSvcCnt; //at most 5
  47. SERVICE_INFO SvcInfo[MAX_INDEPENDENT_SERVICES];
  48. } SERVICE_INFOLIST, *PSERVICE_INFOLIST;
  49. //typedefs
  50. typedef struct _COMMON_RESOURCE {
  51. #ifdef COMMON_PARAMS_DEFINED
  52. COMMON_PARAMS Params;
  53. #endif
  54. HRESOURCE hResource;
  55. HANDLE ServiceHandle[MAX_INDEPENDENT_SERVICES][1+MAX_PROVIDOR_SERVICES];
  56. DWORD ServiceCnt; //at most 5
  57. RESOURCE_HANDLE ResourceHandle;
  58. LPWSTR ResourceName;
  59. HKEY ResourceKey;
  60. HKEY ParametersKey;
  61. CLUS_WORKER OnlineThread;
  62. BOOL Online;
  63. } COMMON_RESOURCE, *PCOMMON_RESOURCE;
  64. //prototypes
  65. /*
  66. VOID
  67. ClusResLogEventWithName0(
  68. IN HKEY hResourceKey,
  69. IN DWORD LogLevel,
  70. IN DWORD LogModule,
  71. IN LPSTR FileName,
  72. IN DWORD LineNumber,
  73. IN DWORD MessageId,
  74. IN DWORD dwByteCount,
  75. IN PVOID lpBytes
  76. );
  77. */
  78. #ifdef _cplusplus
  79. }
  80. #endif
  81. #endif // ifndef _BOSVC_H