🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Calling a function from ServiceExecute.

#14090
From: MWP
Date: Tue, 26 Aug 2003 16:43
25 lines
1763 bytes
>You have not shown what execute_cc2() is actually doing.  However, I can
>tell you that you are misusing the Terminated property, at least.  The
>execute_cc2() function is expecting a pointer to an actual bool variable,
>but you are trying to take an address of a *property*, not a bool variable.
>That will not work correctly.

Well execute_cc2() does a lot, but as far as this is concerned it does somthing like:

void execute_cc2(bool *Terminated, TServiceThread *Thread)
{
  while (!*Terminated)
  {
    //does stuff
    Sleep(10);
    Thread->ProcessRequests(false)
  }
}

Or is this the wrong way to do this?

Should i be creating a thread with ServiceExecute instead and running execute_cc2() from within that?

BTW... whats the difference between a "Property" and a variable then?
    
Technical Details
Message-ID: <3f4b8e1f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f4b40bb$1@newsgroups.borland.com> <3f4b87cd@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,cccee033616271b2
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-26 09:46:53 PST
From: "MWP" <mwp@overclockers.com.au>
Sender: "MWP" <mwp@overclockers.com.au>
Reply-To: "MWP" <mwp@overclockers.com.au>
Subject: Re: Calling a function from ServiceExecute.
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 203.166.57.11 203.166.57.11    
X-Forwarded-For: unknown
References: <3f4b40bb$1@newsgroups.borland.com> <3f4b87cd@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3f4b8e1f$1@newsgroups.borland.com>
Date: 26 Aug 2003 09:43:11 -0700
X-Trace: newsgroups.borland.com 1061916191 207.105.83.65 (26 Aug 2003 09:43:11 -0700)
Lines: 25
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail