This commit is contained in:
2024-08-07 09:16:27 -04:00
parent fdfadd5c7e
commit 5f971cf684
5200 changed files with 731717 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#ifndef _TRANSACTIONSERVER_SERVICEMANAGER_H_
#define _TRANSACTIONSERVER_SERVICEMANAGER_H_
#ifndef _COMMON_STRING_HPP_
#include <common/string.hpp>
#endif
#ifndef _COMMON_WINSVC_HPP_
#include <common/winsvc.hpp>
#endif
class ServiceManager
{
public:
ServiceManager();
virtual ~ServiceManager();
bool createService(const String &strServiceName,const String &strDisplayName,const String &strBinPath,const String &strAccountName=String(),const String &strPassword=String());
bool deleteService(const String &strServiceName);
bool isOkay(void)const;
private:
void createEventLogEntry(const String &strServiceName,const String &strBinPath);
void removeEventLogEntry(const String &strServiceName);
bool open(void);
void close(void);
SC_HANDLE mhServiceControl;
};
#endif