🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Stopping a service from within itself

#10126
From: Remy Lebeau (TeamB)
Date: Mon, 17 May 2004 17:39
18 lines
1547 bytes
"Frank Gruber" <HVFDMIPUMFPS@spammotel.com> wrote in message
news:40a88602$1@newsgroups.borland.com...

> As Controller is protected this will only work from
> within the service class and not from other parts of the
> service. However you could write a wrapper and
> make it public.

The service class already does have such a public wrapper - the
GetServiceController() method returns a function pointer that calls the
Controller() method internally:

    TServiceController lpController = MyService->GetServiceController();
    lpController(SERVICE_CONTROL_STOP);


Gambit
Technical Details
Message-ID: <40a8fa0b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40a75e29@newsgroups.borland.com> <40a7d8b1$1@newsgroups.borland.com> <40a88602$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,c3caafa44ef41532
X-Google-Attributes: gid10cc67,public
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40a75e29@newsgroups.borland.com> <40a7d8b1$1@newsgroups.borland.com> <40a88602$1@newsgroups.borland.com>
Subject: Re: Stopping a service from within itself
Date: Mon, 17 May 2004 10:39:36 -0700
Lines: 20
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.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <40a8fa0b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1084815883 67.22.138.253 (17 May 2004 10:44:43 -0700)
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail