Changeset 97
- Timestamp:
- 08/24/10 08:57:23 (18 months ago)
- Location:
- trunk/sources/win32service/win32service
- Files:
-
- 2 added
- 4 edited
-
include/rtmpserver/rtmpserver.h (modified) (1 diff)
-
include/svc/serviceregistry.h (added)
-
include/svc/svcdefines.h (modified) (1 diff)
-
src/rtmpserver/rtmpserver.cpp (modified) (3 diffs)
-
src/svc/serviceregistry.cpp (added)
-
src/svc/svc.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/win32service/win32service/include/rtmpserver/rtmpserver.h
r64 r97 7 7 void Run(); 8 8 void Cleanup(); 9 void rtmpserver( );9 void rtmpserver(char * config_filePath); -
trunk/sources/win32service/win32service/include/svc/svcdefines.h
r86 r97 3 3 #define SVCNAME TEXT("evo") //name of the service 4 4 5 //For Registry. Everything is set manually, NOT following any convention. 6 #define ADD_KEY 1 7 #define GET_KEY_VALUE 2 8 #define REGIST_SUCCESS "reg_success" 9 #define REGIST_ERROR "reg_error" 5 10 6 11 // The following are message definitions. -
trunk/sources/win32service/win32service/src/rtmpserver/rtmpserver.cpp
r72 r97 32 32 struct RunningStatus { 33 33 // startup parameters 34 int argc;35 // char **argv;34 // int argc; 35 char * configPath; 36 36 37 37 //Configuration file … … 50 50 RunningStatus gRs = {0}; 51 51 52 void rtmpserver( ) {52 void rtmpserver(char * config_filePath) { 53 53 InitNetworking(); 54 54 55 gRs.configPath = config_filePath; 55 56 do { 56 57 //2. Reset the run flag … … 82 83 83 84 gRs.pConfigFile = new ConfigFile(); 84 string configFilePath = "C:\\rtmpd-clean\\builders\\VS2010\\Debug\\rtmpserver.lua"/*"rtmpserver.lua"*/;85 string configFilePath = gRs.configPath/*"C:\\rtmpd-clean\\builders\\VS2010\\Debug\\rtmpserver.lua"*/; 85 86 string fileName; 86 87 string extension; -
trunk/sources/win32service/win32service/src/svc/svc.cpp
r86 r97 28 28 if( lstrcmpi( argv[1], TEXT("installService")) == 0 ) 29 29 { 30 SvcInstall(); 31 //OpenRegistry(); 30 if(GetSvcRegistry() != REGIST_ERROR) 31 SvcInstall(); 32 else 33 printf("\n The service is not installed because of error(s) in registry\n"); 32 34 return; 33 35 }else if( lstrcmpi( argv[1], TEXT("uninstallService")) == 0) … … 65 67 if (!DoQuerySvc){ 66 68 printf("Server will start normally.\n\n"); 67 rtmpserver( );69 rtmpserver(GetSvcRegistry()); 68 70 return; 69 71 }else{ 70 printf("\nERROR: Server cannot be started normally.\n\n"); 71 printf("Service described above is already installed.\n"); 72 printf("\nERROR: Server cannot be started normally because the service described above is already installed. .\n\n"); 72 73 printf("Start/Stop the server by starting/stopping the service.\n\n"); 73 74 printf("To start server normally, enter 'uninstallService' command to delete the service.\n\n"); … … 392 393 DWORD WINAPI ThreadProc( __in LPVOID lpParameter) 393 394 { 394 rtmpserver( );395 rtmpserver(SvcRegistry(GET_KEY_VALUE)); 395 396 //the lines below works too. 396 397 /*if(Initialize())
Note: See TracChangeset
for help on using the changeset viewer.
