digitalmars.D.learn - Examples of Windows services in D?
- Graham Fawcett (11/11) Feb 21 2012 Hi folks,
- Andrej Mitrovic (4/4) Feb 21 2012 Noooo, it wasn't me. I keep having to tell this to people, it was
- Graham Fawcett (3/7) Feb 21 2012 Ah, sorry to spread misinformation, Andrej. :)
- DNewbie (4/20) Feb 22 2012 Here is a simple service in D
- Graham Fawcett (15/37) Feb 23 2012 Hey, thanks for this. I ended up doing the same thing (translating an
- HeiHon (8/11) Sep 07 2013 This example seems to have 404ed.
- Tyler Jensen (3/15) Aug 08 2014 I am very interested to find a good example for D2 of a Windows
- Tyler Jensen (4/25) Aug 09 2014 Found this:
Hi folks, I've got a Windows service that I'd like to write in D, if possible. I see that Andrej Mitrovic has provided a binding for the relevant parts of the Windows API (thanks!): https://github.com/AndrejMitrovic/DWinProgramming/blob/master/win32/ winsvc.d Has anyone used this (or another binding) to write an actual service? Particularly, I was hoping to find a "base class" that takes care of common tasks (installing, removing, starting, etc.). Thanks! Graham
Feb 21 2012
Noooo, it wasn't me. I keep having to tell this to people, it was taken from http://www.dsource.org/projects/bindings/wiki/WindowsApi but it often doesn't compile with the latest compiler version so I keep it updated inside my project.
Feb 21 2012
On Tue, 21 Feb 2012 17:35:34 +0100, Andrej Mitrovic wrote:Noooo, it wasn't me. I keep having to tell this to people, it was taken from http://www.dsource.org/projects/bindings/wiki/WindowsApi but it often doesn't compile with the latest compiler version so I keep it updated inside my project.Ah, sorry to spread misinformation, Andrej. :) Graham
Feb 21 2012
Here is a simple service in D http://my.opera.com/run3/blog/2012/02/23/windows-services-in-d It's basically c translated to d. On Tue, Feb 21, 2012, at 03:08 PM, Graham Fawcett wrote:Hi folks, I've got a Windows service that I'd like to write in D, if possible. I see that Andrej Mitrovic has provided a binding for the relevant parts of the Windows API (thanks!): https://github.com/AndrejMitrovic/DWinProgramming/blob/master/win32/ winsvc.d Has anyone used this (or another binding) to write an actual service? Particularly, I was hoping to find a "base class" that takes care of common tasks (installing, removing, starting, etc.). Thanks! Graham
Feb 22 2012
On Thu, 23 Feb 2012 02:33:04 +0100, DNewbie wrote:Here is a simple service in D http://my.opera.com/run3/blog/2012/02/23/windows-services-in-d It's basically c translated to d.Hey, thanks for this. I ended up doing the same thing (translating an existing service from C++). But my code is messy, and I shall mine your example for improvements. :) I am *very* glad I could write this thing in D! One thing that bit me: if you want to use an extended Service Control Handler (RegisterServiceCtrlHandlerEx), these functions are absent from advapi32.lib (at least in my recent version of DMD). I had to include a linkage.def file, when linking, to get it working: EXETYPE NT IMPORTS RegisterServiceCtrlHandlerExA 12 = advapi32.RegisterServiceCtrlHandlerExA Cheers, GrahamOn Tue, Feb 21, 2012, at 03:08 PM, Graham Fawcett wrote:Hi folks, I've got a Windows service that I'd like to write in D, if possible. I see that Andrej Mitrovic has provided a binding for the relevant parts of the Windows API (thanks!): https://github.com/AndrejMitrovic/DWinProgramming/blob/master/win32/ winsvc.d Has anyone used this (or another binding) to write an actual service? Particularly, I was hoping to find a "base class" that takes care of common tasks (installing, removing, starting, etc.). Thanks! Graham
Feb 23 2012
On Thursday, 23 February 2012 at 01:33:10 UTC, DNewbie wrote:Here is a simple service in D http://my.opera.com/run3/blog/2012/02/23/windows-services-in-d It's basically c translated to d.This example seems to have 404ed. Is there an example of a simple service written in D2 somewhere? I have a service written in D1 that works just fine. But I couldn't get it to work with D2 - I think I ran into the same problems as Steve Teale: http://forum.dlang.org/thread/ic32he$2ifl$1 digitalmars.com All other example code I could find also was D1 only.
Sep 07 2013
I am very interested to find a good example for D2 of a Windows Service implementation. Can you point me to one? On Saturday, 7 September 2013 at 13:57:07 UTC, HeiHon wrote:On Thursday, 23 February 2012 at 01:33:10 UTC, DNewbie wrote:Here is a simple service in D http://my.opera.com/run3/blog/2012/02/23/windows-services-in-d It's basically c translated to d.This example seems to have 404ed. Is there an example of a simple service written in D2 somewhere? I have a service written in D1 that works just fine. But I couldn't get it to work with D2 - I think I ran into the same problems as Steve Teale: http://forum.dlang.org/thread/ic32he$2ifl$1 digitalmars.com All other example code I could find also was D1 only.
Aug 08 2014
Found this: https://github.com/alvatar/snippets/blob/086f1714927df1338ac36b3633a3a91034a8347c/d/scrapple/bevutils/ServiceBase.d Will be exploring it to see if I can make it work. On Saturday, 9 August 2014 at 05:08:40 UTC, Tyler Jensen wrote:I am very interested to find a good example for D2 of a Windows Service implementation. Can you point me to one? On Saturday, 7 September 2013 at 13:57:07 UTC, HeiHon wrote:On Thursday, 23 February 2012 at 01:33:10 UTC, DNewbie wrote:Here is a simple service in D http://my.opera.com/run3/blog/2012/02/23/windows-services-in-d It's basically c translated to d.This example seems to have 404ed. Is there an example of a simple service written in D2 somewhere? I have a service written in D1 that works just fine. But I couldn't get it to work with D2 - I think I ran into the same problems as Steve Teale: http://forum.dlang.org/thread/ic32he$2ifl$1 digitalmars.com All other example code I could find also was D1 only.
Aug 09 2014