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.

159 lines
3.6 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. svcs.h
  5. Abstract:
  6. This file contains definitions that may be used by service dlls that
  7. run in an instance of svchost.exe.
  8. Author:
  9. Rajen Shah rajens 12-Apr-1991
  10. [Environment:]
  11. User Mode - Win32
  12. Revision History:
  13. 20-Sep-2000 JSchwart
  14. Split SVCS-specific data from SVCHOST-specific data.
  15. 25-Oct-1993 Danl
  16. Used to be services.h in the net\inc directory.
  17. Made it non-network specific and moved to private\inc.
  18. 12-Apr-1991 RajenS
  19. Created
  20. --*/
  21. #ifndef _SVCS_
  22. #define _SVCS_
  23. #ifndef RPC_NO_WINDOWS_H // Don't let rpc.h include windows.h
  24. #define RPC_NO_WINDOWS_H
  25. #endif // RPC_NO_WINDOWS_H
  26. #include <rpc.h> // RPC_IF_HANDLE
  27. //
  28. // Service DLLs loaded into services.exe all export the same main
  29. // entry point. SVCS_ENTRY_POINT defines that name.
  30. //
  31. // Note that SVCS_ENTRY_POINT_STRING is always ANSI, because that's
  32. // what GetProcAddress takes.
  33. //
  34. #define SVCS_ENTRY_POINT ServiceEntry
  35. #define SVCS_ENTRY_POINT_STRING "ServiceEntry"
  36. //
  37. // Start and stop RPC server entry point prototype.
  38. //
  39. typedef
  40. NTSTATUS
  41. (*PSVCS_START_RPC_SERVER) (
  42. IN LPWSTR InterfaceName,
  43. IN RPC_IF_HANDLE InterfaceSpecification
  44. );
  45. typedef
  46. NTSTATUS
  47. (*PSVCS_STOP_RPC_SERVER) (
  48. IN RPC_IF_HANDLE InterfaceSpecification
  49. );
  50. typedef
  51. NTSTATUS
  52. (*PSVCS_STOP_RPC_SERVER_EX) (
  53. IN RPC_IF_HANDLE InterfaceSpecification
  54. );
  55. typedef
  56. VOID
  57. (*PSVCS_NET_BIOS_OPEN) (
  58. VOID
  59. );
  60. typedef
  61. VOID
  62. (*PSVCS_NET_BIOS_CLOSE) (
  63. VOID
  64. );
  65. typedef
  66. DWORD
  67. (*PSVCS_NET_BIOS_RESET) (
  68. IN UCHAR LanAdapterNumber
  69. );
  70. //
  71. // Structure containing "global" data for the various DLLs.
  72. //
  73. typedef struct _SVCHOST_GLOBAL_DATA
  74. {
  75. //
  76. // NT well-known SIDs
  77. //
  78. PSID NullSid; // No members SID
  79. PSID WorldSid; // All users SID
  80. PSID LocalSid; // NT local users SID
  81. PSID NetworkSid; // NT remote users SID
  82. PSID LocalSystemSid; // NT system processes SID
  83. PSID LocalServiceSid; // NT LocalService SID
  84. PSID NetworkServiceSid; // NT NetworkService SID
  85. PSID BuiltinDomainSid; // Domain Id of the Builtin Domain
  86. PSID AuthenticatedUserSid; // NT authenticated users SID
  87. PSID AnonymousLogonSid; // Anonymous logon SID
  88. //
  89. // Well Known Aliases.
  90. //
  91. // These are aliases that are relative to the built-in domain.
  92. //
  93. PSID AliasAdminsSid; // Administrator Sid
  94. PSID AliasUsersSid; // User Sid
  95. PSID AliasGuestsSid; // Guest Sid
  96. PSID AliasPowerUsersSid; // Power User Sid
  97. PSID AliasAccountOpsSid; // Account Operator Sid
  98. PSID AliasSystemOpsSid; // System Operator Sid
  99. PSID AliasPrintOpsSid; // Print Operator Sid
  100. PSID AliasBackupOpsSid; // Backup Operator Sid
  101. //
  102. // Entry points provided by svchost.exe
  103. //
  104. PSVCS_START_RPC_SERVER StartRpcServer;
  105. PSVCS_STOP_RPC_SERVER StopRpcServer;
  106. PSVCS_STOP_RPC_SERVER_EX StopRpcServerEx;
  107. PSVCS_NET_BIOS_OPEN NetBiosOpen;
  108. PSVCS_NET_BIOS_CLOSE NetBiosClose;
  109. PSVCS_NET_BIOS_RESET NetBiosReset;
  110. }
  111. SVCHOST_GLOBAL_DATA, *PSVCHOST_GLOBAL_DATA;
  112. //
  113. // Service global entry point prototype.
  114. //
  115. typedef
  116. VOID
  117. (*LPSVCHOST_PUSH_GLOBAL_FUNCTION) (
  118. IN PSVCHOST_GLOBAL_DATA g_pSvchostSharedGlobals
  119. );
  120. #endif // ndef _SVCS_