🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7889

Controlling Windows service

#7889
From: Deepak Mishra
Date: Mon, 13 Dec 2004 08:34
21 lines
1825 bytes
Hi All,

I am developing a multi-user system 
It will have a background process (Windows service, running on server machine) which can be triggered
in two ways:

The background processes is needed for uploading and downloading files to/from remote server thru ftp.
Now the requirement is such that this process should be triggered whenever the first user logs in to the
system and should stop when the last user logs out of the system. 
Also, there should be some mechanism by which the end-user can control this process.
That is, the client application should also have a button for initiating and terminating the process

Now my concern is when the process is triggered automatically, then the client application will neither
have the �PID� nor the �Process Handle�.
In such a scenario, can that process be terminated by its process name? Also, can we check the status
of a process by its name so that we can restrict the user from running multiple instances of the same process?

Regards,

Deepak Mishra
Technical Details
Message-ID: <41bd5410$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2580bf3649196f02,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII
From: "Deepak Mishra" <deepak.dmishra@gmail.com>
Sender: "Deepak Mishra" <deepak.dmishra@gmail.com>
Reply-To: "Deepak Mishra" <deepak.dmishra@gmail.com>
Subject: Controlling Windows service
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 203.200.198.98     
NNTP-Posting-Host: 207.105.83.66
Message-ID: <41bd5410$1@newsgroups.borland.com>
Date: 13 Dec 2004 00:34:24 -0800
X-Trace: newsgroups.borland.com 1102926864 207.105.83.66 (13 Dec 2004 00:34:24 -0800)
Lines: 21
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail