$100 bounty for help with Windows Service code

Tyler Jensen via Digitalmars-d digitalmars-d at puremagic.com
Sun Aug 17 16:56:54 PDT 2014


On Sunday, 17 August 2014 at 22:38:38 UTC, Vladimir Panteleev 
wrote:
> On Sunday, 17 August 2014 at 21:24:24 UTC, Tyler Jensen wrote:
>> Despite the error, the process runs and the ServiceMain is 
>> called and the worker thread executes as you can see from the 
>> following logging output:
>>
>> [[
>> main ["C:\\Code\\DPlay\\edge\\edge\\Debug DMD x64\\edge.exe"], 
>> tid: 9980
>> initialize, tid: 9980
>> RunService serviceTable.ptr 81359A3F00, tid: 9980
>> ServiceMain pid: 11092813551BE58, tid: 5852
>> RegisterServiceCtrlHandler, serviceStatusHandle 894776416, 
>> tid: 5852
>> pendStatus 0, tid: 5852
>> runningStatus 0, tid: 5852
>> worker pid: 11092, tid: 9964
>> worker thread, tid: 9964
>> ]]
>
> Erm, forgot about this bit. Clearly this is a different problem 
> than the one I had on my XP VM.
>
> The log shows that SetStatus returns 0, indicating that 
> SetServiceStatus is failing. I would suggest logging 
> GetLastError's result for more information.

GetLastError on both returns 0. I had misread the 
SetServiceStatus documentation and was assuming a 0 was success. 
Am looking into that. I'm also trying to figure out how to get 
access to the message box you mentioned.


More information about the Digitalmars-d mailing list