comp.lang.ada
 help / color / mirror / Atom feed
* Windows services in GNAT Ada
@ 2003-02-26  1:02 NOSPAM
  2003-02-26  3:33 ` Steve
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: NOSPAM @ 2003-02-26  1:02 UTC (permalink / raw)


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.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Windows services in GNAT Ada
  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-26 13:20 ` David Marceau
  2003-02-26 19:09 ` Wiljan Derks
  2 siblings, 1 reply; 7+ messages in thread
From: Steve @ 2003-02-26  3:33 UTC (permalink / raw)


Look for seti @ home.  There is an Ada client that is open source which
should provide a good example.  Google brought up a link, but I couldn't
manage to move to the site.  You might check www.adapower.com for a link.

There is also something called "srvany" that is supposed to let you run
programs as a service (I don't know the details).

Steve
(The Duck)

<ron(NOSPAM)bebe@bellsouth.net> wrote in message
news:FdU6a.94116$Kj2.8232@fe02.atl2.webusenet.com...
> 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.
>
>
>





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Windows services in GNAT Ada
  2003-02-26  3:33 ` Steve
@ 2003-02-26  9:15   ` Peter Hermann
  2003-02-28  2:28     ` Ted Dennison
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Hermann @ 2003-02-26  9:15 UTC (permalink / raw)


Steve <nospam_steved94@attbi.com> wrote:
> Look for seti @ home.  There is an Ada client that is open source which

indeed:
http://www.telepath.com/~dennison/Ted/SETI/SETI_Service.html
see also:
http://www.csv.ica.uni-stuttgart.de/homes/ph/resources_on_ada.html

-- 
--Peter Hermann(49)0711-685-3611 fax3758 ica2ph@csv.ica.uni-stuttgart.de
--Pfaffenwaldring 27 Raum 114, D-70569 Stuttgart Uni Computeranwendungen
--http://www.csv.ica.uni-stuttgart.de/homes/ph/
--Team Ada: "C'mon people let the world begin" (Paul McCartney)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Windows services in GNAT Ada
  2003-02-26  1:02 Windows services in GNAT Ada NOSPAM
  2003-02-26  3:33 ` Steve
@ 2003-02-26 13:20 ` David Marceau
  2003-02-26 19:09 ` Wiljan Derks
  2 siblings, 0 replies; 7+ messages in thread
From: David Marceau @ 2003-02-26 13:20 UTC (permalink / raw)


"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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Windows services in GNAT Ada
  2003-02-26  1:02 Windows services in GNAT Ada NOSPAM
  2003-02-26  3:33 ` Steve
  2003-02-26 13:20 ` David Marceau
@ 2003-02-26 19:09 ` Wiljan Derks
  2003-02-26 19:43   ` Randy Brukardt
  2 siblings, 1 reply; 7+ messages in thread
From: Wiljan Derks @ 2003-02-26 19:09 UTC (permalink / raw)


Check out srvany. This tools was in the NT4 resource kit.
It allows to run any program as a service.

We started with this tools and it worked fine.
Finally we needed more functionality and build our own version in Ada95.

Wiljan





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Windows services in GNAT Ada
  2003-02-26 19:09 ` Wiljan Derks
@ 2003-02-26 19:43   ` Randy Brukardt
  0 siblings, 0 replies; 7+ messages in thread
From: Randy Brukardt @ 2003-02-26 19:43 UTC (permalink / raw)


Wiljan Derks wrote in message <6h87a.5724$m45.936290@zonnet-reader-1>...
>Check out srvany. This tools was in the NT4 resource kit.
>It allows to run any program as a service.
>
>We started with this tools and it worked fine.
>Finally we needed more functionality and build our own version in
Ada95.


I second the endorsement of SrvAny. I've used this for years to run
various Ada programs as services. The Adaic.com web server is run with a
copy of SrvAny.

I believe someone wrote a generic Ada interface for making services
directly, but I've never seen any reason to use for 'personal' software.
(Look on AdaPower for that.)

             Randy.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Windows services in GNAT Ada
  2003-02-26  9:15   ` Peter Hermann
@ 2003-02-28  2:28     ` Ted Dennison
  0 siblings, 0 replies; 7+ messages in thread
From: Ted Dennison @ 2003-02-28  2:28 UTC (permalink / raw)


Peter Hermann wrote:
> Steve <nospam_steved94@attbi.com> wrote:
> 
>>Look for seti @ home.  There is an Ada client that is open source which
> 
> 
> indeed:
> http://www.telepath.com/~dennison/Ted/SETI/SETI_Service.html

Steve probably had trouble finding the page because a lot of search 
engines have the old URL without the "~" char.


To add a bit more info to this, the SETI@Home service (at the above 
page) comes with some semi-thick Win32 bindings. One of these bindings 
allows Ada programs to run as and register themselves as NT services. If 
anyone doesn't like the GPL I put on this code, contact me. I'd be 
perfectly willing to license anyone to use the bindings as GMGPL or 
anything else appropriate. The full GPL was intended cheifly for the 
SETI stuff.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-02-28  2:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2003-02-26 19:09 ` Wiljan Derks
2003-02-26 19:43   ` Randy Brukardt

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