🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: NT Service

#11361
From: Remy Lebeau (TeamB)
Date: Sun, 15 Feb 2004 00:50
22 lines
1842 bytes
"Lapo Guidi" <lapoguidi@inwind.it> wrote in message
news:402eb9ec$1@newsgroups.borland.com...

> I would like to have an existing program will run like a service.

The only way to do that, without re-writing the application to be a true
service, is to have another service load the application as a separate
process within the service's context.  That is exactly what Microsoft's
SRVANY tool does.

> I would like to understand how should I change or recode to do that.

I suggest you read the Win32 API documentation.  There is an entire chapter
on what services are and how they work.

Since you are posting this to a Borland C++ Builder newsgroup, have you
tried simply using BCB's TService class?  Go to the File menu, choose New,
and then Service Application.


Gambit
Technical Details
Message-ID: <402ec07e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.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: <402d3191@newsgroups.borland.com> <402d379b$1@newsgroups.borland.com> <402d579d@newsgroups.borland.com> <402d6ab9$1@newsgroups.borland.com> <402eb9ec$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,cefc6b0a844ad91c
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-02-14 17:09:32 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <402d3191@newsgroups.borland.com> <402d379b$1@newsgroups.borland.com> <402d579d@newsgroups.borland.com> <402d6ab9$1@newsgroups.borland.com> <402eb9ec$1@newsgroups.borland.com>
Subject: Re: NT Service
Date: Sat, 14 Feb 2004 16:50:20 -0800
Lines: 24
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: 67.22.138.253
Message-ID: <402ec07e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1076805758 67.22.138.253 (14 Feb 2004 16:42:38 -0800)
Path: arc1-ca.pugleaf.net!archiver1.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