Changeset 78 for trunk/sources/win32service/win32service/readme.txt
- Timestamp:
- 08/17/10 11:23:57 (21 months ago)
- File:
-
- 1 edited
-
trunk/sources/win32service/win32service/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/win32service/win32service/readme.txt
r73 r78 3 3 Source: http://msdn.microsoft.com/en-us/library/bb540476%28v=VS.85%29.aspx 4 4 5 Brief Description: 6 win32service is a win32 console application that installs a service named "evo". 7 This service can be started and stopped using the Services Administrative Tool seen from the Control Panel. 5 BRIEF DESCRIPTION: 6 win32service is a win32 console application that runs the following command: 7 1. Installs a Windows service named "evo" 8 2. Uninstalls the service named "evo" 9 3. Starts the service 10 4. Stops the service 11 5. Starts the rtmpserver normally in the console. 12 In addition, the service can also be started and stopped using the Services Administrative Tool seen from the Control Panel. 8 13 9 Additional Applications: 10 There are other applications outside win32service that can be useful in testing: 11 1. SvcControl - is a console application that can start and stop the service. More commands can be done here (refer to Source) 12 2. SvcConfig - is a consol application that can be used to delete the service. More commands can be done here (refer to Source) 14 MODULES: 15 1. svcconfig - contains the function that deletes/uninstalls the service. This is also where the application checks if a service is already installed. 16 2. svccontrol - contains the functions that starts and stops the service. 17 3. svc - contains the "main" function. When the service is created, the SvcMain acts as the main function of the thread when the service starts. 18 4. rtmpserver - is the application that runs the server. 13 19 14 Instruction (How to use ?):20 Instruction (How to use): 15 21 To start/stop service: 16 22 1. Compile the application. 17 23 2. Open a command prompt as administrator (right click on command prompt, select "Run as Administrator"). 18 24 3. cd to directory of win32service. 19 4. Type "win32service install " and wait for "Service installed successfuly" to appear.25 4. Type "win32service installService" and wait for "Service installed successfuly" to appear. 20 26 5. Check the Service admin tool and look for "evo" service. 21 27 6. Start/Stop evo service. 22 28 23 To delete the service: compile SvcConfig, cd to the dir of svcconfig.exe, type "svcconfig delete evo". 24 25 To start/stop rtmpserver (Will be improved soon) 29 To start/stop rtmpserver 26 30 rtmpserver should start when evo service starts. To make sure that it starts successfuly: 27 31 - Put the exact path of rtmpserver.lua in line#-84 of rtmpserver.cpp. 28 32 - Assign a "mediaFolder" parameter in rtmpserver.lua 29 Stop the evo service to stop rtmpserver. 33 Start the server by starting the service using the 'startService' command. 34 Stop the server by stopping the service using the 'stopService' command. 35 If the service is not installed, start the server normally by running the application without any command parameter. 36 37 To uninstall the service, enter the 'uninstallService' command. 38 39 SOME TECHNICAL DETAILS: 40 - The application makes sure that when the service is installed, the user will not be able to start the server normally. 41 - To check if the service is installed, the application queries information about the service. If the query returns a value, the server will not be started normally. 42 - Running the application without any command assumes that the user is attempting to start the server in a normal way. 43 - svcconfig and svccontrol have other functions that can be useful during testing and in future implementations, hence a lot of codes remain intact. 30 44 31 45 NOTES: 46 - [as of commit in 08-17-2010] The config file is hard-coded in rtmpserver.cpp 32 47 - Currently, the rtmpserver logs is saved to C:\\RTMPServerlogs.txt. 33 48 - There are limited sample applications in the net that implements this model. 34 - In most of the sample apps, they loop a "while()" during the service's RUNNING state, simulating a running thread (since SvcMain acts likea thread).49 - In most of the sample apps, they loop a "while()" during the service's RUNNING state, simulating a running thread (since SvcMain acts as a thread).
Note: See TracChangeset
for help on using the changeset viewer.
