Article View: borland.public.cppbuilder.nativeapi
Article #7913Re: Controlling Windows service
From: Deepak Mishra
Date: Wed, 15 Dec 2004 13:26
Date: Wed, 15 Dec 2004 13:26
37 lines
3034 bytes
3034 bytes
1) Suppose I've the set of machines. a) Machine A - Acting as the database server. On which the Server application say (say "MyServer") of my client-server architecture is installed and running. b) Machine B1, B2, B3, B4....and so on - Prsentation layer (say "MyClient") of client-server architecture is installed. c) Machine C - This has nothing to do with my application. 2) Machine A will also have a windows service (say "FTPService") running on it alongwith MyServer. 3) FPService will not start automatically when the OS starts ( which usually is not the case with the normal windows services. It will be in a pause mode). 4)Whenever, first MyClient from any of the client machines (B1, B2...) connects to the MyServer, FTPService should get started. 5) MyClient will have a button for stopping the FTPService if it is running and they want to stop it. 6) MyClient will also have a button to start the FTPService if it is not running ( which will be the case when some other or the same MyClient has stopped it). 7) Whenever the last connected MyClient disconnects with the MyServer, FTPService should get stopped. 8) I'm using TCP/IP to communicate between MyClient and MyServer and also to uplaod files from Machine A to Machine C, through FTPService. 9) Machine A and Machine B1, B2, B3.....etc. are part of a LAN. 10) The whole setup of applications (the application will be deployed at at various locations on N number of LANs) Now my questions are: 1) How do I get to to know the name of the Machine A at design time, to use the "OpenSCManager". (Keeping in mind point 10 above). 2) What will be better, creating FTPService as a windows service for the above requirements. Or to create a separate thread or process in the MyServer application to do the job tobe done by FTPService. Regards, Deepak
Technical Details
Message-ID:
<41c03b9d$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newshosting.com!nx02.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<41bd5410$1@newsgroups.borland.com> <41bd87dc$1@newsgroups.borland.com> <41bd993f$1@newsgroups.borland.com> <41bdec9b$3@newsgroups.borland.com> <41beb248$1@newsgroups.borland.com> <41bec2e7$1@newsgroups.borland.com> <41becfcf$1@newsgroups.borland.com> <rbbur018gt22husuna7agpbfessgu0nqs6@4ax.com> <41bf34ee$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2580bf3649196f02 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Deepak Mishra" <deepak.dmishra@gmail.com> Sender: "Deepak Mishra" <deepak.dmishra@gmail.com> Reply-To: "Deepak Mishra" <deepak.dmishra@gmail.com> Subject: Re: Controlling Windows service Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 61.246.193.66 References: <41bd5410$1@newsgroups.borland.com> <41bd87dc$1@newsgroups.borland.com> <41bd993f$1@newsgroups.borland.com> <41bdec9b$3@newsgroups.borland.com> <41beb248$1@newsgroups.borland.com> <41bec2e7$1@newsgroups.borland.com> <41becfcf$1@newsgroups.borland.com> <rbbur018gt22husuna7agpbfessgu0nqs6@4ax.com> <41bf34ee$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <41c03b9d$1@newsgroups.borland.com> Date: 15 Dec 2004 05:26:53 -0800 X-Trace: newsgroups.borland.com 1103117213 207.105.83.66 (15 Dec 2004 05:26:53 -0800) Lines: 37 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newshosting.com!nx02.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail