August 18, 2014 Re: $100 bounty for help with Windows Service code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tyler Jensen | Shouldn't you be starting with rt_init() in ServiceMain? |
August 18, 2014 Re: $100 bounty for help with Windows Service code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On 2014-08-17 9:11 PM, Vladimir Panteleev wrote:
> Please try changing the definition of SERVICE_STATUS_HANDLE from DWORD
> to size_t. I'll commit a fix to the win32 bindings repository.
Where does `mixin DECLARE_HANDLE!` come from?
|
August 18, 2014 Re: $100 bounty for help with Windows Service code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Etienne | On 2014-08-18 11:29 AM, Etienne wrote:
> On 2014-08-17 9:11 PM, Vladimir Panteleev wrote:
>> Please try changing the definition of SERVICE_STATUS_HANDLE from DWORD
>> to size_t. I'll commit a fix to the win32 bindings repository.
>
> Where does `mixin DECLARE_HANDLE!` come from?
Nevermind, it looks like the git mirror is out of date. It would be useful to have as a dub project, maybe I could make a dub.json if you promise to push your changes to it? ;)
|
August 18, 2014 Re: $100 bounty for help with Windows Service code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Etienne | On Monday, 18 August 2014 at 15:33:42 UTC, Etienne wrote: > On 2014-08-18 11:29 AM, Etienne wrote: >> On 2014-08-17 9:11 PM, Vladimir Panteleev wrote: >>> Please try changing the definition of SERVICE_STATUS_HANDLE from DWORD >>> to size_t. I'll commit a fix to the win32 bindings repository. >> >> Where does `mixin DECLARE_HANDLE!` come from? > > Nevermind, it looks like the git mirror is out of date. It would be useful to have as a dub project, maybe I could make a dub.json if you promise to push your changes to it? ;) Which git mirror are you talking about? I have two auto-updating git mirrors for the win32 bindings: The entire bindings project: https://github.com/CS-svnmirror/dsource-bindings Just the win32 package (useful for git submodules): https://github.com/CS-svnmirror/dsource-bindings-win32 |
August 18, 2014 Re: $100 bounty for help with Windows Service code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Etienne | On Monday, 18 August 2014 at 15:12:58 UTC, Etienne wrote:
> Shouldn't you be starting with rt_init() in ServiceMain?
The runtime should be already initialized before main() is run, however, now that you mention it, I think ServiceMain should call thread_attachThis(). I see there is a commented-out line in the code to do this already.
|
August 18, 2014 Re: $100 bounty for help with Windows Service code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On Monday, 18 August 2014 at 15:42:26 UTC, Vladimir Panteleev wrote:
> On Monday, 18 August 2014 at 15:12:58 UTC, Etienne wrote:
>> Shouldn't you be starting with rt_init() in ServiceMain?
>
> The runtime should be already initialized before main() is run, however, now that you mention it, I think ServiceMain should call thread_attachThis(). I see there is a commented-out line in the code to do this already.
I did try the suggested thread_attachThis() but it did not help.
Not saying it should not be done, but it was not the cause or the
solution. Ultimately, it was the HANDLE that was the problem.
Thanks, to Vladimir, this has been resolved.
I will continue to experiment with and try to create my own
"reference" implementation for a Windows Service since much of
what I plan to write in D will be deployed as such.
|
August 18, 2014 Re: $100 bounty for help with Windows Service code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On 2014-08-18 11:38 AM, Vladimir Panteleev wrote: > Which git mirror are you talking about? Oh! I really thought it was this: https://github.com/AndrejMitrovic/WindowsAPI That's because there's a link to it on the dsource page http://www.dsource.org/projects/bindings/wiki/WindowsApi |
August 18, 2014 Re: $100 bounty for help with Windows Service code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Etienne | On Monday, 18 August 2014 at 18:24:15 UTC, Etienne wrote:
> On 2014-08-18 11:38 AM, Vladimir Panteleev wrote:
>> Which git mirror are you talking about?
>
> Oh! I really thought it was this:
>
> https://github.com/AndrejMitrovic/WindowsAPI
>
> That's because there's a link to it on the dsource page
>
> http://www.dsource.org/projects/bindings/wiki/WindowsApi
Browse the source of the latter link and you'll find Vladimir's fix. Andrej's mirror is not updated yet.
|
August 18, 2014 Re: $100 bounty for help with Windows Service code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tyler Jensen | On Monday, 18 August 2014 at 21:12:15 UTC, Tyler Jensen wrote:
> On Monday, 18 August 2014 at 18:24:15 UTC, Etienne wrote:
>> http://www.dsource.org/projects/bindings/wiki/WindowsApi
>
> Browse the source of the latter link and you'll find Vladimir's fix.
That's because I've just added it :)
|
August 22, 2014 Re: $100 bounty for help with Windows Service code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On Monday, 18 August 2014 at 21:23:38 UTC, Vladimir Panteleev wrote: > On Monday, 18 August 2014 at 21:12:15 UTC, Tyler Jensen wrote: >> On Monday, 18 August 2014 at 18:24:15 UTC, Etienne wrote: >>> http://www.dsource.org/projects/bindings/wiki/WindowsApi >> >> Browse the source of the latter link and you'll find Vladimir's fix. > > That's because I've just added it :) Here's the result of refactoring it. https://github.com/duovia/WindowsServiceInD |
Copyright © 1999-2021 by the D Language Foundation