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.

192 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. precomp.hxx
  5. Abstract:
  6. Master include file.
  7. Author:
  8. Keith Moore (keithmo) 05-Feb-1997
  9. Revision History:
  10. --*/
  11. #ifndef _PRECOMP_HXX_
  12. #define _PRECOMP_HXX_
  13. //
  14. // System include files.
  15. //
  16. #include <nt.h>
  17. #include <ntrtl.h>
  18. #include <nturtl.h>
  19. #include <windows.h>
  20. #include <ole2.h>
  21. #include <stdio.h>
  22. #include <stdlib.h>
  23. #include <string.h>
  24. #include <memory.h>
  25. //
  26. // Project include files.
  27. //
  28. #include <iadmw.h>
  29. #include <iiscnfg.h>
  30. #include <mdlib.hxx>
  31. //
  32. // Our metabase change notification sink. The implementation of this
  33. // object is in SINK.CXX.
  34. //
  35. class ADMIN_SINK : public BASE_ADMIN_SINK {
  36. public:
  37. //
  38. // Usual constructor/destructor stuff.
  39. //
  40. ADMIN_SINK();
  41. ~ADMIN_SINK();
  42. //
  43. // Secondary constructor.
  44. //
  45. HRESULT
  46. Initialize(
  47. IN IUnknown * Object
  48. );
  49. //
  50. // Change notification callback.
  51. //
  52. virtual
  53. HRESULT
  54. STDMETHODCALLTYPE
  55. SinkNotify(
  56. IN DWORD NumElements,
  57. IN MD_CHANGE_OBJECT ChangeList[]
  58. );
  59. HRESULT
  60. STDMETHODCALLTYPE
  61. ShutdownNotify( void)
  62. {
  63. return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
  64. }
  65. //
  66. // Wait for state change.
  67. //
  68. DWORD
  69. WaitForStateChange(
  70. IN DWORD Timeout
  71. );
  72. private:
  73. //
  74. // An event object signalled whenever MD_SERVER_STATE changes.
  75. //
  76. HANDLE m_StateChangeEvent;
  77. }; // ADMIN_SINK;
  78. //
  79. // Pointer to a command handler in our command table.
  80. //
  81. typedef
  82. VOID
  83. (WINAPI * PFN_COMMAND)(
  84. IN IMSAdminBase * AdmCom,
  85. IN ADMIN_SINK * Sink,
  86. IN INT argc,
  87. IN LPWSTR argv[]
  88. );
  89. //
  90. // An entry in our command table.
  91. //
  92. typedef struct _COMMAND_TABLE {
  93. LPWSTR Name;
  94. PFN_COMMAND Handler;
  95. } COMMAND_TABLE, *PCOMMAND_TABLE;
  96. //
  97. // Command handlers from various files. The signatures for these
  98. // functions must match PFN_COMMAND.
  99. //
  100. VOID
  101. WINAPI
  102. StartCommand(
  103. IN IMSAdminBase * AdmCom,
  104. IN ADMIN_SINK * Sink,
  105. IN INT argc,
  106. IN LPWSTR argv[]
  107. );
  108. VOID
  109. WINAPI
  110. StopCommand(
  111. IN IMSAdminBase * AdmCom,
  112. IN ADMIN_SINK * Sink,
  113. IN INT argc,
  114. IN LPWSTR argv[]
  115. );
  116. VOID
  117. WINAPI
  118. PauseCommand(
  119. IN IMSAdminBase * AdmCom,
  120. IN ADMIN_SINK * Sink,
  121. IN INT argc,
  122. IN LPWSTR argv[]
  123. );
  124. VOID
  125. WINAPI
  126. ContinueCommand(
  127. IN IMSAdminBase * AdmCom,
  128. IN ADMIN_SINK * Sink,
  129. IN INT argc,
  130. IN LPWSTR argv[]
  131. );
  132. VOID
  133. WINAPI
  134. QueryCommand(
  135. IN IMSAdminBase * AdmCom,
  136. IN ADMIN_SINK * Sink,
  137. IN INT argc,
  138. IN LPWSTR argv[]
  139. );
  140. #endif // _PRECOMP_HXX_