🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

send command to the other TService Program

#15688
From: Emmanuel
Date: Mon, 16 Jun 2003 05:29
26 lines
1695 bytes
Dear All,

I want to write a program, which can send command to the other TService
Program.
like IIS, it can control the IIS Service and FTP Service
would you tell me how can I do that?
I find some function in the help file

BOOL ControlService(
    SC_HANDLE hService, // handle to service
    DWORD dwControl, // control code
    LPSERVICE_STATUS lpServiceStatus  // pointer to service status structure
   );

but how can the TService receive?
there is no event for the TService to support that command

I have thought before, I can you TCP/IP Socket to send command to the
TService,
but it will waste one port for each TService

would you tell me the advance method?


Emmanuel
emmanuel@erphk.com
Technical Details
Message-ID: <3eed559e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,83bccf2d4fe20ff1,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-15 22:33:26 PST
From: "Emmanuel" <emmanuel@erphk.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: send command to the other TService Program
Date: Mon, 16 Jun 2003 13:29:03 +0800
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 202.146.98.71
Message-ID: <3eed559e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1055741342 202.146.98.71 (15 Jun 2003 22:29:02 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail