🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Service termination

#7637
From: Tumurbaatar S.
Date: Wed, 19 Jan 2005 04:48
27 lines
1889 bytes
Thank you!
The 2nd method answers my 2nd question.
I was interested on using OnDestroy because
I thought that manually stopping a service does not
call OnStop.

P.S. Also, what for OnShutdown event? I hope OnStop
is called when system shuts down.

>
>> Can I use OnCreate/OnDestroy instead them?
>
> Never use those events in C++.  They are Delphi remnants that can be
> triggered before/after the constructor/destructor, respectively, which is
> illegal in C++.  Use the actual constructor/destructor instead.  In any
> case, the issue regarding using the constructor/destructor vs. the
> OnStart/OnStop events depends on what you are actually doing in the first
> place.  Some things are fine to use in the constructor/destructor, and 
> some
> things should be in the OnStart/OnStop events instead.  You need to 
> provide
> more specific details if you want a more elaborate answer.
>
>
> Gambit
>
> 
Technical Details
Message-ID: <41ede6b1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newshosting.com!nx01.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41ec832f@newsgroups.borland.com> <41ecbd8b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5b91f6aac9d5e006
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Tumurbaatar S." <nospam_tumur@magicnet.mn>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <41ec832f@newsgroups.borland.com> <41ecbd8b$1@newsgroups.borland.com>
Subject: Re: Service termination
Date: Wed, 19 Jan 2005 12:48:45 +0800
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
NNTP-Posting-Host: 202.131.2.6
Message-ID: <41ede6b1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1106110129 202.131.2.6 (18 Jan 2005 20:48:49 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newshosting.com!nx01.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail