Article View: borland.public.cppbuilder.nativeapi
Article #14070Re: Messaging a TService
From: Remy Lebeau (TeamB)
Date: Mon, 25 Aug 2003 17:04
Date: Mon, 25 Aug 2003 17:04
35 lines
1978 bytes
1978 bytes
"BlackFrancis" <areyouabot@toobad.com> wrote in message
news:3f49ee2e$1@newsgroups.borland.com...
> Thanks for that. I have now been able to write ControlService
> code that makes a call to the Service, using an SCManager handle.
> What I don't have is the message handling routines in my TService.
> Could you briefly explain (possibly with sample code) how this is done?
I already told you how to handle that - override the
TService::DoCustomControl() method. For example:
class TMyService : public TService
{
//...
protected:
bool __fastcall DoCustomControl(DWORD CtrlCode);
//...
};
bool __fastcall TMyService::DoCustomControl(DWORD CtrlCode)
{
if( CtrlCode == MY_MESSAGE )
// do something
return true;
}
Gambit
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03
Technical Details
Message-ID:
<3f4a418a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f46e02e$1@newsgroups.borland.com> <3f47d014@newsgroups.borland.com> <3f49ee2e$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,161ad0877257a485 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-25 10:08:02 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f46e02e$1@newsgroups.borland.com> <3f47d014@newsgroups.borland.com> <3f49ee2e$1@newsgroups.borland.com> Subject: Re: Messaging a TService Date: Mon, 25 Aug 2003 10:04:06 -0700 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f4a418a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1061831050 207.175.226.26 (25 Aug 2003 10:04:10 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail