🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Can't stop NT Service

#13487
From: Victor G. Baron
Date: Fri, 10 Oct 2003 17:43
39 lines
2231 bytes
Thanx, Gambit! I also just found a thread on MERS with the exact same question
and answer. Now I realize my error. Another quick question:

When I first install the service, it does not start automatically, I have to
manually do it. I want it to start any time the system is rebooted w/o having to
manually do it. How is this implemented?

thanx,

Vic



On Fri, 10 Oct 2003 10:20:55 -0700, "Remy Lebeau \(TeamB\)"
<gambit47.no.spam@no.spam.yahoo.com> wrote:

>
>"Victor G. Baron" <vgbaron@hotmail.com> wrote in message
>news:meidovo1ugiqu1hnrvm121bthuc0pgl1d6@4ax.com...
>
>> Add the following to the Execute method
><snip>
>
>There's your bug.  By assigning an OnExecute event hanlder, you are telling
>the service that you will handle EVERYTHING yourself, including processing
>incoming requests from the SCM.  However, you are not actually doing that at
>all.  Your loop needs to call ServiceThread->ProcessRequests().  Otherwise
>do not use the OnExecute event at all (which I strongly discourage using
>anyway - its better to start a new worker thread in the OnStart event and
>stop the thread in the OnStop/Shutdown events).
>
>
>Gambit
>

-- 
Vic Baron
I haven't lost my mind, it's backed up on disk somewhere!
UPDATE!!-- I have lost my mind.
Technical Details
Message-ID: <ihrdovspltl3tccu0ftvm1quraev3vqpg2@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <meidovo1ugiqu1hnrvm121bthuc0pgl1d6@4ax.com> <3f86ea06@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e4e83a8cd98f5ec
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-10 11:10:01 PST
From: Victor G. Baron <vgbaron@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Can't stop NT Service
Date: Fri, 10 Oct 2003 10:43:00 -0700
Message-ID: <ihrdovspltl3tccu0ftvm1quraev3vqpg2@4ax.com>
References: <meidovo1ugiqu1hnrvm121bthuc0pgl1d6@4ax.com> <3f86ea06@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.9/32.560
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 64.175.210.162
X-Trace: newsgroups.borland.com 1065807803 64.175.210.162 (10 Oct 2003 10:43:23 -0700)
Lines: 39
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail