Today an interesting question came up in the Delphi-PRAXiS. One of our users asked how to parse parameters sent to a NT service application. The good old trusted version of normal VCL applications does not work:
for I := 1 to ParamCount do Foo(ParamStr(I));
for
to
do
So a quick dive into the Delphi 2007 source code revealed an interesting property of the TService class, called Param.
for I := 1 to ParamCount do Foo(Param[I]);
So if you ever want to run parameterized services, that is the way to get them ;-)
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
Theme design by Jelle Druyts