Parameters of NT Services#

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));

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 ;-)

Monday, February 25, 2008 10:42:13 AM (W. Europe Standard Time, UTC+01:00) #    Comments [0]  | 

 

Google AdSense


Comments are closed.
All content © 2008, Daniel Wischnewski
On this page
Archives
Promoted Links
Blogroll OPML
My current Flickr Images
www.flickr.com
Dies ist ein Flickr Modul mit �ffentlichen Fotos und Videos von dwischnewski. Ihr eigenes Modul k�nnen Sie hier erstellen.
Recommendations
Sitemap
Special Pages
Disclaimer

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