HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_NTServiceManager.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  *
7  * Authored by:
8  * Chris Thompson
9  * Side Effects Software Inc.
10  *
11  * NAME: UT_NTServiceManager.h (Utility Library, C++)
12  *
13  * COMMENTS: A C++ class to handle the work of controlling
14  * NT services.
15  *
16  */
17 
18 #ifndef __UT_NTServiceManager_h__
19 #define __UT_NTServiceManager_h__
20 
21 #include <windows.h>
22 
23 #include "UT_API.h"
24 
25 #define HSERVER_SERVICE "HoudiniServer"
26 #define SESINETD_SERVICE "HoudiniLicenseServer"
27 #define OLD_HSERVER_SERVICE "HServer"
28 #define OLD_SESINETD_SERVICE "SESINetD"
29 
31 {
32 public:
33  UT_NTServiceManager(const char *machine = 0);
34  virtual ~UT_NTServiceManager();
35 
36  bool isOpen() const;
37 
38  bool startService(const char *name) const;
39  bool stopService(const char *name) const;
40  bool installService(const char *name, const char *display,
41  const char *path) const;
42  bool uninstallService(const char *name) const;
43  bool isServiceInstalled(const char *name) const;
44  bool isServiceRunning(const char *name) const;
45 
46 private:
47  bool waitForStatus(SC_HANDLE service,
48  unsigned long desiredState,
49  int timeout) const;
50 
51  SC_HANDLE myManager;
52 };
53 
54 #endif // __UT_NTServiceManager_h__
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
#define UT_API
Definition: UT_API.h:12
GLbitfield GLuint64 timeout
Definition: glcorearb.h:1598
GLuint const GLchar * name
Definition: glcorearb.h:785