Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Running my program as a service WinNT/2000

0 views
Skip to first unread message

The New Guy

unread,
Jun 14, 2001, 4:29:56 PM6/14/01
to
Greetings all

I have developed a database engine which needs to be run at a periodic time.

I would like to have the program run as a service under Windows NT or Windows
2000 but I don't know if this is something that I need to program into my
database or it is simply launching the program with the correct command line
option.

Could someone shed some light on my problem?

Thanks

The New Guy

Scott McPhillips

unread,
Jun 14, 2001, 6:41:48 PM6/14/01
to

The program architecture of a service is completely different from the
architecture of a GUI program or console program and requires calls to
the Service Control Manager APIs. If you would rather not revise your
program extensively you could try the SrvAny utility that comes in the
NT resource kit. It is a tiny service that can launch your existing
app. This is not the best solution for production but it is very easy
to evaluate :)

--
Scott McPhillips [VC++ MVP]

.

unread,
Jun 14, 2001, 11:11:16 PM6/14/01
to
In article <3B291FB1...@home.com>, the.n...@home.com says...

Try WROX 'Professional NT Services' by Kevin Miller. www.bookpool.com is
a good place to get it.

You will need to use the NT SCM to create (and potentially remove) your
service and it needs to have a few simple service specific bits, but
mostly its really easy. One thing - it's usually a very bad thing from a
security standpoint to have services interact directly with a logged on
user. Typically a good design will use a second executable that runs in
the users logon session to talk to the service, or the service can have
a thread attach to the correct desktop and impersonate the logged on
user.

If you want I can send you a simple service in source code form. Write
me at charli...@nai.com

Charlie

Nik Mokhnatov

unread,
Jun 16, 2001, 12:38:33 AM6/16/01
to
On Thu, 14 Jun 2001 20:29:56 GMT, The New Guy <the.n...@home.com>
wrote:

>I would like to have the program run as a service under Windows NT or Windows
>2000 but I don't know if this is something that I need to program into my
>database or it is simply launching the program with the correct command line
>option.
>

The answer is depends on language you used. For instance, most
applications written in Delphi 3/4/5/6 uses SvCom (www.aldyn.ru) for
creating services. SvCom can emulate Service API even in Win9X.

---
Sincerely yours,
Nik Mokhnatov, n...@softilium.com
Softilium Development Group, http://www.softilium.com
*** SVA : The best tool to distribute your software in the Internet.
*** PatchBase : Your personal software's knowledgebase.

0 new messages