Ring's NTService library is part of the PBOSL suite - and has been for quite some time. Check out http://www.purebasic.fr/english/viewtopic.php?t=17100SkyManager wrote:This link seems not working
Windows Service Framework
-
- Enthusiast
- Posts: 767
- Joined: Sat Jan 24, 2004 6:56 pm
-
- Enthusiast
- Posts: 339
- Joined: Tue Jan 30, 2007 5:47 am
- Location: Hong Kong
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
Works fine for me, on WinXP Pro SP2.SkyManager wrote:When I run the PBOL4 example and perform a "-u" uninstallation, the NTService status is changed into "Disabled" and not remove from the NT Service list.
What can we do to fix this
[EDIT]
That is, if I stop the service before the uninstall. Haven't tried without it, but that seems stupid... :roll:

(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
-
- Enthusiast
- Posts: 339
- Joined: Tue Jan 30, 2007 5:47 am
- Location: Hong Kong
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
If you specify either SERVICE_WIN32_OWN_PROCESS or SERVICE_WIN32_SHARE_PROCESS, and the service is running in the context of the LocalSystem account, you can also specify the following value.
so the service can interact with the Desktop.
Example,
Code: Select all
#SERVICE_INTERACTIVE_PROCESS = $100
Example,
Code: Select all
T_SERVICE = CreateService_(T_SCMANAGER, AppExeName, ServiceName, #SERVICE_ALL_ACCESS, (#SERVICE_WIN32_OWN_PROCESS | #SERVICE_INTERACTIVE_PROCESS), #SERVICE_DEMAND_START, #SERVICE_ERROR_NORMAL, AppHome + AppExeFileName, 0, 0, 0, 0, 0)

(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Be ware though, that in Vista, Server 2008 and all future Windows versions interactive services doesn't work! This is also true if you use Fast User Switching in XP. The service will start as usual but can neither show output or recieve input from a user!
Here is an explaination of why: http://blogs.technet.com/voy/archive/20 ... erver.aspx
Here is an explaination of why: http://blogs.technet.com/voy/archive/20 ... erver.aspx
techjunkie wrote:If you specify either SERVICE_WIN32_OWN_PROCESS
or SERVICE_WIN32_SHARE_PROCESS, and the service is running in the context of the LocalSystem account, you can also specify the following value.
so the service can interact with the Desktop.Code: Select all
#SERVICE_INTERACTIVE_PROCESS = $100
Example,
Code: Select all
T_SERVICE = CreateService_(T_SCMANAGER, AppExeName, ServiceName, #SERVICE_ALL_ACCESS, (#SERVICE_WIN32_OWN_PROCESS | #SERVICE_INTERACTIVE_PROCESS), #SERVICE_DEMAND_START, #SERVICE_ERROR_NORMAL, AppHome + AppExeFileName, 0, 0, 0, 0, 0)
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
Thanks!maw wrote:Be ware though, that in Vista, Server 2008 and all future Windows versions interactive services doesn't work! This is also true if you use Fast User Switching in XP.



(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Re: Windows Service Framework
it's amazing that after a couple of years, the code is still valid!
I got another 'crash' issue here, i should call myself mr. crash
here you go:
copy & paste the code and tested, working!
and then I added EnableExplicit, did adjustment here and there,
myservice -i
net start myservice
wait, it crashes!!
copy and paste the original code again, it's still working without crash!
i start to compare my version with original version, the only things i added are
poorman's debug like:
and i start to remove those lines from my version step by step.
still crashes, keep doing so till ... i remove this line
voila!
but WHY?!
I got another 'crash' issue here, i should call myself mr. crash

here you go:
copy & paste the code and tested, working!
and then I added EnableExplicit, did adjustment here and there,
myservice -i
net start myservice
wait, it crashes!!
copy and paste the original code again, it's still working without crash!
i start to compare my version with original version, the only things i added are
poorman's debug like:
Code: Select all
_WriteLog("into function ServiceMain ")
still crashes, keep doing so till ... i remove this line
Code: Select all
Procedure ServiceMain()
;;_WriteLog("into function ServiceMain ")
but WHY?!