comp.lang.ada
 help / color / mirror / Atom feed
From: David Marceau <davidmarceau@sympatico.ca>
Subject: Re: Windows services in GNAT Ada
Date: Wed, 26 Feb 2003 08:20:00 -0500
Date: 2003-02-26T08:20:00-05:00	[thread overview]
Message-ID: <3E5CBF00.930EAD42@sympatico.ca> (raw)
In-Reply-To: FdU6a.94116$Kj2.8232@fe02.atl2.webusenet.com

"ron(NOSPAM)bebe"@bellsouth.net wrote:
> 
> Is anyone aware of information about creating Windows NT services using Ada?
> I would like to create a service to move files to another network host on a
> fixed frequency, or other timed events.

Alternative #1
-----------------
This is the easiest route to go.

If you want to avoid the nt service/event api altogether look at the NT
command line "at" command if I remember correctly.  It is like cron.  

Alternative #2
--------------
There is some effort but at least you will have access all the services
in COM api which is basically everything Microsoft really wants to offer
to normal developers not at the device driver level.

If you want to behave like a usual service on nt, first off get to know
the ms-win32 api for the nt Service/event logger.
You will find source examples from the msdn(microsoft developer network
knowledge base) at http://msdn.microsoft.com.
You can get a free login for some of the basic stuff but for the most
recent stuff you might need to purchase a subscription $$$
to get at the premiere($$) access links.

Once you have looked at this check out David Botton's adacom bindings at
http://www.adapower.com because you might want to use the nt
service/event logger api provided by the vb com components which are
accessible from anywhere that talks com like office for example with vb
for applications.  


Alternative #3
--------------
There is some effort here but it makes for a small exe IMHO.

If you want to avoid adacom then you could consider the alternative of
just writing the C bindings you will need based on the win32 api c
header files.  Someone on CLA recently posted a link where you can
download the thin bindings for the win32 api.  I suggest you do a google
search on the CLA newsgroup to find this link.  

Cheers,
David Marceau



  parent reply	other threads:[~2003-02-26 13:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-26  1:02 Windows services in GNAT Ada NOSPAM
2003-02-26  3:33 ` Steve
2003-02-26  9:15   ` Peter Hermann
2003-02-28  2:28     ` Ted Dennison
2003-02-26 13:20 ` David Marceau [this message]
2003-02-26 19:09 ` Wiljan Derks
2003-02-26 19:43   ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox