00001 #ifndef WBWINDRIVER_H
00002 #define WBWINDRIVER_H
00003
00004
00005 #include "WBPath.h"
00006 #include <base/BaseUtility.h>
00007 #include <winsvc.h>
00008
00009 namespace Spr {
00010
00011 class SPR_DLL WBLoadWindowsDriver{
00012 protected:
00013 WBPath path;
00014 std::string drvName;
00015 SC_HANDLE hSCMan;
00016 SC_HANDLE hService;
00017 public:
00018
00019 WBLoadWindowsDriver();
00020
00021 ~WBLoadWindowsDriver();
00022
00023
00024 const char* Path(){ return path.Path().c_str(); }
00025
00026 void Path(const char* p);
00027
00028 const char* Name(){ return drvName.c_str(); }
00029
00030 void File(const char* f);
00031
00032 void Install();
00033
00034 void Start();
00035
00036 void Stop();
00037
00038 void Remove();
00039
00040 bool IsOpen();
00041
00042 bool IsStart();
00043 protected:
00044
00045 void Init();
00046
00047 void Cleanup();
00048
00049 void Open();
00050 };
00051
00052 }
00053
00054 #endif
00055