Re: Integrate vibe.d into Windows Service

2018-11-27 Thread Daniel Kozak via Digitalmars-d-learn
On Wednesday, 21 November 2018 at 09:59:19 UTC, Andre Pany wrote: Hi, I translated the CPP example of a windows service to D. https://docs.microsoft.com/en-us/windows/desktop/Services/svc-cpp [...] Today I needed this too, and after some searching I came across this package which works ok

Re: Integrate vibe.d into Windows Service

2018-11-23 Thread Andre Pany via Digitalmars-d-learn
On Friday, 23 November 2018 at 21:35:57 UTC, Andre Pany wrote: On Friday, 23 November 2018 at 21:27:26 UTC, Kagamin wrote: You don't need to initialize runtime because it's initialized by standard D startup code, but you need to attach threads that are not created by D or static constructors

Re: Integrate vibe.d into Windows Service

2018-11-23 Thread Andre Pany via Digitalmars-d-learn
On Friday, 23 November 2018 at 21:27:26 UTC, Kagamin wrote: You don't need to initialize runtime because it's initialized by standard D startup code, but you need to attach threads that are not created by D or static constructors won't be run and only C-level code would work there. Thank

Re: Integrate vibe.d into Windows Service

2018-11-23 Thread Kagamin via Digitalmars-d-learn
You don't need to initialize runtime because it's initialized by standard D startup code, but you need to attach threads that are not created by D or static constructors won't be run and only C-level code would work there.

Re: Integrate vibe.d into Windows Service

2018-11-23 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 21 November 2018 at 15:05:31 UTC, Kagamin wrote: Start vibe in another thread and return from ServiceMain, see https://docs.microsoft.com/en-us/windows/desktop/Services/service-servicemain-function also ideally you should report running state only after vibe initialized, opened

Re: Integrate vibe.d into Windows Service

2018-11-21 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 21 November 2018 at 15:05:31 UTC, Kagamin wrote: Start vibe in another thread and return from ServiceMain, see https://docs.microsoft.com/en-us/windows/desktop/Services/service-servicemain-function also ideally you should report running state only after vibe initialized, opened

Re: Integrate vibe.d into Windows Service

2018-11-21 Thread Kagamin via Digitalmars-d-learn
Start vibe in another thread and return from ServiceMain, see https://docs.microsoft.com/en-us/windows/desktop/Services/service-servicemain-function also ideally you should report running state only after vibe initialized, opened sockets and started listening, before that it's not really running.

Integrate vibe.d into Windows Service

2018-11-21 Thread Andre Pany via Digitalmars-d-learn
Hi, I translated the CPP example of a windows service to D. https://docs.microsoft.com/en-us/windows/desktop/Services/svc-cpp I wonder how can I integrate a vibe.d http server here: __gshared HANDLE ghSvcStopEvent = NULL; VOID SvcInit(DWORD dwArgc, LPTSTR* lpszArgv) { ghSvcStopEvent

Re: Windows Service

2018-11-14 Thread Thomas via Digitalmars-d-learn
On Thursday, 15 November 2018 at 04:45:26 UTC, Soulsbane wrote: On Wednesday, 14 November 2018 at 19:38:08 UTC, Thomas wrote: Hi, I want to run a D program as a Windows service. After googl'in, I only found a very old project on github: https://github.com/tylerjensen/WindowsServiceInD

Re: Windows Service

2018-11-14 Thread Soulsbane via Digitalmars-d-learn
On Wednesday, 14 November 2018 at 19:38:08 UTC, Thomas wrote: Hi, I want to run a D program as a Windows service. After googl'in, I only found a very old project on github: https://github.com/tylerjensen/WindowsServiceInD Unfortunately, I wasn't able to compile it successfully. Does anybody

Windows Service

2018-11-14 Thread Thomas via Digitalmars-d-learn
Hi, I want to run a D program as a Windows service. After googl'in, I only found a very old project on github: https://github.com/tylerjensen/WindowsServiceInD Unfortunately, I wasn't able to compile it successfully. Does anybody know of newer approaches or even a template to start from

Re: Windows DLL / Windows service

2014-08-22 Thread Tyler Jensen via Digitalmars-d-learn
On Saturday, 7 June 2014 at 16:16:28 UTC, Etienne wrote: On Saturday, 7 June 2014 at 16:07:47 UTC, Adam D. Ruppe wrote: On Saturday, 7 June 2014 at 14:41:15 UTC, Etienne Cimon wrote: no documentation though. Any idea how to attach/detach with a known example? I'd also like to create a windows

Windows DLL / Windows service

2014-06-07 Thread Etienne Cimon via Digitalmars-d-learn
Hello, I'm looking to compile a server into a windows service, and there doesn't seem to be any info out there except this : http://forum.dlang.org/thread/c95ngs$1t0n$1...@digitaldaemon.com It doesn't call rt_init, would that be the only thing missing from there? Also, the d runtime seems

Re: Windows DLL / Windows service

2014-06-07 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 7 June 2014 at 14:41:15 UTC, Etienne Cimon wrote: no documentation though. Any idea how to attach/detach with a known example? I'd also like to create a windows DLL that compiles through DMD/GDC/LDC with extern(c) so that folks from C++ can link with it . Check this out:

Re: Windows DLL / Windows service

2014-06-07 Thread Etienne via Digitalmars-d-learn
On Saturday, 7 June 2014 at 16:07:47 UTC, Adam D. Ruppe wrote: On Saturday, 7 June 2014 at 14:41:15 UTC, Etienne Cimon wrote: no documentation though. Any idea how to attach/detach with a known example? I'd also like to create a windows DLL that compiles through DMD/GDC/LDC with extern(c) so