🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Messaging a TService

#14249
From: Remy Lebeau (TeamB)
Date: Sat, 23 Aug 2003 19:42
34 lines
2288 bytes
"BlackFrancis" <areyouabot@toobad.com> wrote in message
news:3f46e02e$1@newsgroups.borland.com...

> I have been able to send messages (using SendMessage) and
> recieve them by overriding WndProc.  My problem is now that I
> want to send a message to a TService.

Services do not accept messages like you are thinking.

> TServices aren't allowed to have Controls

That's not entirely accurate, but it takes a lot of work to set it up
correctly, so it is best to not put controls in services directly.

> Is there any way around this, or will I have to try
> an alternative messaging methodology?

You will have to set up and establish a different kind of IPC (inter-process
communication) connection to the service.  Depending on the nature of your
messages, if they do not have any parameters, then you can use
ControlService() to send custom control codes to the service.  TService has
a protected DoCustomControl() method that you can override for processing
them.  Otherwise, you will need to use named pipes, TCP sockets, RPC (Remote
Procedure Call), COM, etc instead.


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: <3f47d014@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f46e02e$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-23 13:40:03 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f46e02e$1@newsgroups.borland.com>
Subject: Re: Messaging a TService
Date: Sat, 23 Aug 2003 12:42:28 -0700
Lines: 36
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: <3f47d014@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1061670932 207.175.226.26 (23 Aug 2003 13:35:32 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail