From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,530d4fe356f6d7e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-26 05:30:05 PST Message-ID: <3E5CBF00.930EAD42@sympatico.ca> From: David Marceau X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.17-10mdksmp i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Windows services in GNAT Ada References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 26 Feb 2003 08:20:00 -0500 NNTP-Posting-Host: 65.92.162.213 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1046266015 65.92.162.213 (Wed, 26 Feb 2003 08:26:55 EST) NNTP-Posting-Date: Wed, 26 Feb 2003 08:26:55 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.litech.org!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cyclone.bc.net!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:34605 Date: 2003-02-26T08:20:00-05:00 List-Id: "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