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.

138 lines
3.4 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. winsvcp.h
  5. Abstract:
  6. Contains internal interfaces exported by the service controller.
  7. Author:
  8. Anirudh Sahni (anirudhs) 14-Feb-1996
  9. Environment:
  10. User Mode -Win32
  11. Revision History:
  12. 14-Feb-1996 anirudhs
  13. Created.
  14. --*/
  15. #ifndef _WINSVCP_INCLUDED
  16. #define _WINSVCP_INCLUDED
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. //
  21. // Name of event to pulse to request a device-arrival broadcast,
  22. // deliberately cryptic
  23. //
  24. #define SC_BSM_EVENT_NAME L"ScNetDrvMsg"
  25. //
  26. // Name of event the SCM will set once service auto-start is
  27. // complete. It will never be reset.
  28. //
  29. #define SC_AUTOSTART_EVENT_NAME L"SC_AutoStartComplete"
  30. //
  31. // Named events the SCM uses for handshaking with setup.exe
  32. // during OOBE setup.
  33. //
  34. #define SC_OOBE_PNP_DONE L"OOBE_PNP_DONE"
  35. #define SC_OOBE_MACHINE_NAME_DONE L"OOBE_MACHINE_NAME_DONE"
  36. //
  37. // This is the same as EnumServicesStatus except for the additional
  38. // parameter pszGroupName. The enumerated services are restricted
  39. // to those belonging to the group named in pszGroupName.
  40. // If pszGroupName is NULL this API is identical to EnumServicesStatus.
  41. //
  42. // If we decide to publish this API we should modify the parameter
  43. // list to be extensible to future types of enumerations without needing
  44. // to add a new API for each type of enumeration.
  45. //
  46. // This API is not supported on machines running Windows NT version 3.51
  47. // or earlier, except if pszGroupName is NULL, in which case the call
  48. // maps to EnumServicesStatus.
  49. //
  50. WINADVAPI
  51. BOOL
  52. WINAPI
  53. EnumServiceGroupW(
  54. SC_HANDLE hSCManager,
  55. DWORD dwServiceType,
  56. DWORD dwServiceState,
  57. LPENUM_SERVICE_STATUSW lpServices,
  58. DWORD cbBufSize,
  59. LPDWORD pcbBytesNeeded,
  60. LPDWORD lpServicesReturned,
  61. LPDWORD lpResumeHandle,
  62. LPCWSTR pszGroupName
  63. );
  64. //
  65. // Callback function passed to PnP for them to call when a service
  66. // needs to receive notification of PnP events
  67. //
  68. typedef DWORD (*PSCMCALLBACK_ROUTINE)(
  69. SERVICE_STATUS_HANDLE hServiceStatus,
  70. DWORD OpCode,
  71. DWORD dwEventType,
  72. LPARAM EventData,
  73. LPDWORD lpdwHandlerRetVal
  74. );
  75. //
  76. // Callback function passed to PnP for them to call to validate
  77. // a service calling RegisterDeviceNotification
  78. //
  79. typedef DWORD (*PSCMAUTHENTICATION_CALLBACK)(
  80. IN LPWSTR lpServiceName,
  81. OUT SERVICE_STATUS_HANDLE *lphServiceStatus
  82. );
  83. //
  84. // Private client-side API for RegisterDeviceNotification to look
  85. // up a service's display name given its SERVICE_STATUS_HANDLE
  86. //
  87. DWORD
  88. I_ScPnPGetServiceName(
  89. IN SERVICE_STATUS_HANDLE hServiceStatus,
  90. OUT LPWSTR lpServiceName,
  91. IN DWORD cchBufSize
  92. );
  93. //
  94. // Private API for Terminal Server to tell the SCM to send
  95. // console switch notification to services that are interested
  96. //
  97. DWORD
  98. I_ScSendTSMessage(
  99. DWORD OpCode,
  100. DWORD dwEvent,
  101. DWORD cbData,
  102. LPBYTE lpData
  103. );
  104. #if DBG
  105. void
  106. SccInit(
  107. DWORD dwReason
  108. );
  109. #endif // DBG
  110. #ifdef __cplusplus
  111. } // extern "C"
  112. #endif
  113. #endif // _WINSVCP_INCLUDED