Click here to Skip to main content
16,008,010 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Photoshop-like toolbox issue Pin
lfsong22-Jul-03 2:29
lfsong22-Jul-03 2:29 
GeneralBuilding A Personal Webserver Pin
jmetcalf16-Jul-03 14:58
jmetcalf16-Jul-03 14:58 
GeneralRe: Building A Personal Webserver Pin
Heath Stewart17-Jul-03 1:25
protectorHeath Stewart17-Jul-03 1:25 
GeneralRun-Time Routines and .NET Framework Equivalents Pin
Nathan Blomquist15-Jul-03 4:35
Nathan Blomquist15-Jul-03 4:35 
GeneralRe: Run-Time Routines and .NET Framework Equivalents Pin
Frank Olorin Rizzi15-Jul-03 6:25
Frank Olorin Rizzi15-Jul-03 6:25 
GeneralRe: Run-Time Routines and .NET Framework Equivalents Pin
Nick Parker16-Jul-03 7:17
protectorNick Parker16-Jul-03 7:17 
GeneralRe: Run-Time Routines and .NET Framework Equivalents Pin
leppie16-Jul-03 7:33
leppie16-Jul-03 7:33 
GeneralRe: Windows Service Pin
Xiangyang Liu 刘向阳15-Jul-03 0:30
Xiangyang Liu 刘向阳15-Jul-03 0:30 
WiB wrote:
How to pass arguments in OnStart method of service?
Service supposed to start automatically at a boot time.


There is no way to pass arguments to a service at boot time, that is because the Windows API CreateService does not take any "default" argument. However, if you can create a service that is not started automatically at boot time and create a second service whose job is to start the first service at boot time, then you can pass arguments to the first service (using the StartService API).

<Edit>It is probably easier to</Edit> do it (the second service) in C/C++, by the way. If you don't want to bother writing a service in C/C++, you can use XYNTService[^] to start your service, passing any argument you want from the "command line" defined in the .ini file.

Click here to see my articles and software tools
GeneralRe: Windows Service Pin
Xiangyang Liu 刘向阳15-Jul-03 0:55
Xiangyang Liu 刘向阳15-Jul-03 0:55 
GeneralRe: Windows Service Pin
Xiangyang Liu 刘向阳15-Jul-03 1:41
Xiangyang Liu 刘向阳15-Jul-03 1:41 
GeneralRe: Windows Service Pin
Xiangyang Liu 刘向阳15-Jul-03 1:50
Xiangyang Liu 刘向阳15-Jul-03 1:50 
GeneralRe: Windows Service Pin
Xiangyang Liu 刘向阳15-Jul-03 1:59
Xiangyang Liu 刘向阳15-Jul-03 1:59 
GeneralRe: Windows Service Pin
Xiangyang Liu 刘向阳15-Jul-03 2:04
Xiangyang Liu 刘向阳15-Jul-03 2:04 
GeneralRe: Windows Service Pin
Heath Stewart15-Jul-03 5:15
protectorHeath Stewart15-Jul-03 5:15 
GeneralRe: Windows Service Pin
Heath Stewart15-Jul-03 8:46
protectorHeath Stewart15-Jul-03 8:46 
GeneralRe: Windows Service Pin
Heath Stewart15-Jul-03 12:44
protectorHeath Stewart15-Jul-03 12:44 
GeneralRe: Windows Service Pin
Heath Stewart16-Jul-03 9:04
protectorHeath Stewart16-Jul-03 9:04 
GeneralRe: Windows Service Pin
Heath Stewart16-Jul-03 13:26
protectorHeath Stewart16-Jul-03 13:26 
GeneralRe: Windows Service Pin
Valeria Bogdevich17-Jul-03 4:46
Valeria Bogdevich17-Jul-03 4:46 
GeneralDirectShow .NET HELP!!! Pin
Brian JR14-Jul-03 8:15
Brian JR14-Jul-03 8:15 
GeneralRe: DirectShow .NET HELP!!! Pin
Heath Stewart15-Jul-03 8:50
protectorHeath Stewart15-Jul-03 8:50 
GeneralRe: DirectShow .NET HELP!!! Pin
Brian JR15-Jul-03 17:50
Brian JR15-Jul-03 17:50 
GeneralRe: DirectShow .NET HELP!!! Pin
J. Dunlap15-Jul-03 18:03
J. Dunlap15-Jul-03 18:03 
GeneralRe: DirectShow .NET HELP!!! Pin
Brian JR16-Jul-03 8:58
Brian JR16-Jul-03 8:58 
GeneralRe: DirectShow .NET HELP!!! Pin
J. Dunlap17-Jul-03 8:41
J. Dunlap17-Jul-03 8:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.