Leaked source code of windows server 2003
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.

140 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. svcsp.h
  5. Abstract:
  6. This file contains definitions used by service dlls that
  7. run inside of services.exe.
  8. Author:
  9. Jonathan Schwartz (jschwart) 20-Sep-2000
  10. --*/
  11. #ifndef _SVCSP_
  12. #define _SVCSP_
  13. #ifndef RPC_NO_WINDOWS_H // Don't let rpc.h include windows.h
  14. #define RPC_NO_WINDOWS_H
  15. #endif // RPC_NO_WINDOWS_H
  16. #include <rpc.h> // RPC_IF_HANDLE
  17. //
  18. // Service DLLs loaded into services.exe all export the same main
  19. // entry point. SVCS_ENTRY_POINT defines that name.
  20. //
  21. // Note that SVCS_ENTRY_POINT_STRING is always ANSI, because that's
  22. // what GetProcAddress takes.
  23. //
  24. #define SVCS_ENTRY_POINT ServiceEntry
  25. #define SVCS_ENTRY_POINT_STRING "ServiceEntry"
  26. //
  27. // Name for the common RPC pipe shared by all the RPC servers in services.exe.
  28. // Note: Because version 1.0 of WinNt had seperate names for each server's
  29. // pipe, the client side names have remained the same. Mapping to the new
  30. // name is handled by the named pipe file system.
  31. //
  32. #define SVCS_RPC_PIPE L"ntsvcs"
  33. //
  34. // Name for the common LRPC protocol and port available in services.exe.
  35. //
  36. #define SVCS_LRPC_PROTOCOL L"ncalrpc"
  37. #define SVCS_LRPC_PORT L"ntsvcs"
  38. //
  39. // Start and stop RPC server entry point prototype.
  40. //
  41. typedef
  42. NTSTATUS
  43. (*PSVCS_START_RPC_SERVER) (
  44. IN LPTSTR InterfaceName,
  45. IN RPC_IF_HANDLE InterfaceSpecification
  46. );
  47. typedef
  48. NTSTATUS
  49. (*PSVCS_STOP_RPC_SERVER) (
  50. IN RPC_IF_HANDLE InterfaceSpecification
  51. );
  52. //
  53. // Structure containing "global" data for the various DLLs.
  54. //
  55. typedef struct _SVCS_GLOBAL_DATA
  56. {
  57. //
  58. // NT well-known SIDs
  59. //
  60. PSID NullSid; // No members SID
  61. PSID WorldSid; // All users SID
  62. PSID LocalSid; // NT local users SID
  63. PSID NetworkSid; // NT remote users SID
  64. PSID LocalSystemSid; // NT system processes SID
  65. PSID LocalServiceSid; // NT LocalService SID
  66. PSID NetworkServiceSid; // NT NetworkService SID
  67. PSID BuiltinDomainSid; // Domain Id of the Builtin Domain
  68. PSID AuthenticatedUserSid; // NT authenticated users SID
  69. //
  70. // Well Known Aliases.
  71. //
  72. // These are aliases that are relative to the built-in domain.
  73. //
  74. PSID AliasAdminsSid; // Administrator Sid
  75. PSID AliasUsersSid; // User Sid
  76. PSID AliasGuestsSid; // Guest Sid
  77. PSID AliasPowerUsersSid; // Power User Sid
  78. PSID AliasAccountOpsSid; // Account Operator Sid
  79. PSID AliasSystemOpsSid; // System Operator Sid
  80. PSID AliasPrintOpsSid; // Print Operator Sid
  81. PSID AliasBackupOpsSid; // Backup Operator Sid
  82. //
  83. // Entry points provided by services.exe
  84. //
  85. PSVCS_START_RPC_SERVER StartRpcServer;
  86. PSVCS_STOP_RPC_SERVER StopRpcServer;
  87. LPWSTR SvcsRpcPipeName;
  88. //
  89. // Miscellaneous useful data
  90. //
  91. BOOL fSetupInProgress; // TRUE if setup is in progress, FALSE otherwise
  92. }
  93. SVCS_GLOBAL_DATA, *PSVCS_GLOBAL_DATA;
  94. //
  95. // Service DLL entrypoint prototype
  96. //
  97. typedef
  98. VOID
  99. (*PSVCS_SERVICE_DLL_ENTRY) (
  100. IN DWORD argc,
  101. IN LPTSTR argv[],
  102. IN PSVCS_GLOBAL_DATA pGlobalData,
  103. IN HANDLE SvcReferenceHandle
  104. );
  105. #endif // ndef _SVCSP_