TService::ParamCount is always zero?
Posted on 2013-06-16
I have written a service application in Borland C++ builder 5 and wish to pass a parameter on the command line when the service application is installed (not when it is started). I have tested this by entering the following onstallation command :
myservice /install param1
The following code is my constructor for the service application and always indicates that the ParamCount has a value of zero, even when passing a parameter after the /install parameter when installing the service.
Is there any way to pass a parameter on the command line when installing a service application ?
__fastcall T_2WSOPDSService1::T_2WSOPDSService1(TComponent* Owner)
pcount = ParamCount;
s.sprintf("ParamCount on installation was %d",pcount);
dbsconnected = false;
update = NULL;