🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Non-visible program

#12398
From: nicolasr
Date: Sat, 06 Dec 2003 01:06
27 lines
1829 bytes
Hi,

I need a non-visible program that runs in the background.
I want to control the program via command line (at startup)
and Event objects signaled from another program (while running).
The program should close itself when it didn't get any
event signaled for some timeout.
At this moment I'm not sure whether I need VCL stuff but it
definitely does not need any windows. Using AnsiString would
be nice but C++ string is ok, too. My main request is that the
executable is not too large.

I would appreciate if anyone could help me with the following
questions:

1) What type of application should I use in BCB? VCL app
and remove the main form? Or console? Pure WinAPI
with a simple message loop in WinMain?

2) My first idea was writing a WinMain function that uses
MsgWaitForMultipleObjects() in a loop. But, does the program
actually need to process any Windows messages if there is
no window? Would WaitForMultipleObejects be enough?
Should I handle WM_QUIT?

thanks for any idea,
Nick
Technical Details
Message-ID: <3fd12b98$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,1d2aeb96c0d7ce05,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-05 17:09:08 PST
From: "nicolasr" <nicolasrNOSPAMATSIGNgmx.net>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Non-visible program
Date: Sat, 6 Dec 2003 02:06:30 +0100
Lines: 29
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: 80.133.168.50
Message-ID: <3fd12b98$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1070672792 80.133.168.50 (5 Dec 2003 17:06:32 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail