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
2.6 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. ScLib.h
  5. Abstract:
  6. Prototypes routines which may be shared between Client (DLL) and
  7. Server (EXE) halves of service controller.
  8. Author:
  9. Dan Lafferty (danl) 04-Feb-1992
  10. Environment:
  11. User Mode -Win32
  12. Revision History:
  13. 04-Feb-1992 danl
  14. created
  15. 10-Apr-1992 JohnRo
  16. Added ScIsValidImagePath() and ScImagePathsMatch().
  17. 14-Apr-1992 JohnRo
  18. Added ScCheckServiceConfigParms(), ScIsValid{Account,Driver,Start}Name.
  19. 27-May-1992 JohnRo
  20. Use CONST where possible.
  21. Fixed a UNICODE bug.
  22. --*/
  23. #ifndef SCLIB_H
  24. #define SCLIB_H
  25. ////////////////////////////////////////////////////////////////////////////
  26. // DEFINES
  27. //
  28. //
  29. // Used by the client side of OpenSCManager to wait until the Service
  30. // Controller has been started.
  31. //
  32. #define SC_INTERNAL_START_EVENT L"Global\\SvcctrlStartEvent_A3752DX"
  33. ////////////////////////////////////////////////////////////////////////////
  34. // FUNCTION PROTOTYPES
  35. //
  36. //
  37. // From acctname.cxx
  38. //
  39. BOOL
  40. ScIsValidAccountName(
  41. IN LPCWSTR lpAccountName
  42. );
  43. //
  44. // From confparm.cxx
  45. //
  46. DWORD
  47. ScCheckServiceConfigParms(
  48. IN BOOL Change,
  49. IN LPCWSTR lpServiceName,
  50. IN DWORD dwActualServiceType,
  51. IN DWORD dwNewServiceType,
  52. IN DWORD dwStartType,
  53. IN DWORD dwErrorControl,
  54. IN LPCWSTR lpBinaryPathName OPTIONAL,
  55. IN LPCWSTR lpLoadOrderGroup OPTIONAL,
  56. IN LPCWSTR lpDependencies OPTIONAL,
  57. IN DWORD dwDependSize
  58. );
  59. //
  60. // From convert.cxx
  61. //
  62. BOOL
  63. ScConvertToUnicode(
  64. OUT LPWSTR *UnicodeOut,
  65. IN LPCSTR AnsiIn
  66. );
  67. BOOL
  68. ScConvertToAnsi(
  69. OUT LPSTR AnsiOut,
  70. IN LPCWSTR UnicodeIn
  71. );
  72. //
  73. // From packstr.cxx
  74. //
  75. BOOL
  76. ScCopyStringToBufferW (
  77. IN LPCWSTR String OPTIONAL,
  78. IN DWORD CharacterCount,
  79. IN LPCWSTR FixedDataEnd,
  80. IN OUT LPWSTR *EndOfVariableData,
  81. OUT LPWSTR *VariableDataPointer,
  82. IN const LPBYTE lpBufferStart OPTIONAL
  83. );
  84. //
  85. // From path.cxx
  86. //
  87. BOOL
  88. ScImagePathsMatch(
  89. IN LPCWSTR OnePath,
  90. IN LPCWSTR TheOtherPath
  91. );
  92. BOOL
  93. ScIsValidImagePath(
  94. IN LPCWSTR ImagePathName,
  95. IN DWORD ServiceType
  96. );
  97. //
  98. // From startnam.cxx
  99. //
  100. BOOL
  101. ScIsValidStartName(
  102. IN LPCWSTR lpStartName,
  103. IN DWORD dwServiceType
  104. );
  105. //
  106. // From util.cxx
  107. //
  108. BOOL
  109. ScIsValidServiceName(
  110. IN LPCWSTR ServiceName
  111. );
  112. #endif // SCLIB_H