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.

75 lines
2.6 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. service.h
  7. Calls to start and stop services.
  8. FILE HISTORY:
  9. */
  10. #ifndef _SERVICE_H
  11. #define _SERVICE_H
  12. #if _MSC_VER >= 1000 // VC 5.0 or later
  13. #pragma once
  14. #endif
  15. class DynamicDLL;
  16. typedef enum _NetApiIndex
  17. {
  18. NET_API_NET_SERVER_GET_INFO = 0,
  19. };
  20. // not subject to localization
  21. static LPCSTR g_apchNetApiFunctionNames[] = {
  22. "NetServerGetInfo",
  23. NULL
  24. };
  25. // not subject to localization
  26. extern DynamicDLL g_NetApiDLL;
  27. typedef LONG (*NETSERVERGETINFO) (LPTSTR, DWORD, LPBYTE *);
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. TFSCORE_API(DWORD) TFSIsComputerNT(LPCTSTR pszComputer, BOOL * bIsNT);
  32. TFSCORE_API(DWORD) TFSIsNTServer(LPCTSTR pszComputer, BOOL * bIsNTS);
  33. TFSCORE_API(DWORD) TFSIsServiceRunning(LPCTSTR pszComputer, LPCTSTR pszServiceName, BOOL * fIsRunning);
  34. TFSCORE_API(DWORD) TFSStartService(LPCTSTR pszComputer, LPCTSTR pszServiceName, LPCTSTR pszServiceDesc);
  35. TFSCORE_API(DWORD) TFSStartServiceEx(LPCTSTR pszComputer, LPCTSTR pszServiceName, LPCTSTR pszClusterResourceType, LPCTSTR pszServiceDesc);
  36. TFSCORE_API(DWORD) TFSStopService(LPCTSTR pszComputer, LPCTSTR pszServiceName, LPCTSTR pszServiceDesc);
  37. TFSCORE_API(DWORD) TFSStopServiceEx(LPCTSTR pszComputer, LPCTSTR pszServiceName, LPCTSTR pszClusterResourceType, LPCTSTR pszServiceDesc);
  38. TFSCORE_API(DWORD) TFSPauseService(LPCTSTR pszComputer, LPCTSTR pszServiceName, LPCTSTR pszServiceDesc);
  39. TFSCORE_API(DWORD) TFSResumeService(LPCTSTR pszComputer, LPCTSTR pszServiceName, LPCTSTR pszServiceDesc);
  40. TFSCORE_API(DWORD) TFSGetServiceStatus(LPCWSTR pswzComputer, LPCWSTR pszServiceName, DWORD *pdwServiceStatus, DWORD *pdwErrorCode);
  41. TFSCORE_API(DWORD) TFSGetServiceStartType(LPCWSTR pswzComputer, LPCWSTR pszServiceName, DWORD *pdwStartType);
  42. TFSCORE_API(DWORD) TFSSetServiceStartType(LPCWSTR pswzComputer, LPCWSTR pszServiceName, DWORD dwStartType);
  43. // internal fuctions
  44. DWORD StartSCMService(LPCTSTR pszComputer, LPCTSTR pszServiceName, LPCTSTR pszServiceDesc);
  45. DWORD StopSCMService(LPCTSTR pszComputer, LPCTSTR pszServiceName, LPCTSTR pszServiceDesc);
  46. DWORD PauseSCMService(LPCTSTR pszComputer, LPCTSTR pszServiceName, LPCTSTR pszServiceDesc);
  47. DWORD ResumeSCMService(LPCTSTR pszComputer, LPCTSTR pszServiceName, LPCTSTR pszServiceDesc);
  48. #ifdef __cplusplus
  49. } // extern "C"
  50. #endif
  51. #endif //_SERVICE_H