Windows Service in Blitzmax - Working!
BlitzMax Forums/BlitzMax Programming/Windows Service in Blitzmax - Working!
| ||
WIN32 ONLY I saw on the forums that it couldn't be done, but I didn't agree, so here it is, a working Windows service. THIS IS CURRENTLY A BETA - I ONLY FINISHED IT TONIGHT Sample Beep Service (beepservice.bmx) Get it here: its_win32service110.zip Or from my Website I'll add some documentation and notes both here and on my website another day, and once properly tested I'll add it to the code archives. To Compile use these build options: * Debug OFF * GUI OFF * Multithreaded ON To Install the service: * beepservice.mt.exe /i To Uninstall * beepservice.mt.exe /u To start the service * net start beepservice To stop the service * net stop beepservice DO NOT RUN IN YOUR IDE - COMPILE IT AND USE THE COMMAND LINE |
| ||
I never even thought about doing something like this, what could you use it for? Kudos for proving nay-sayers wrong :D |
| ||
Who said it couldn't be done? It's just an app... the same as a screensaver. As long as you make it follow the rules for the service APIs, there shouldn't be a problem creating it in BlitzMax. |
| ||
Very nice! |
| ||
@Galaxy613: A back-end server in a multiplayer game is one use. @Brucey: When I was looking to see if it had been done before, I found a comment or two saying that Blitzmax didn't expose the correct interfaces for it to work. I didn't believe them. It's only a console application, although it did need to wait for multi-threading support. I've started a projects page for this app which can be found Here (Lots to do though)... Si... |
| ||
Exe2Service, anyone...? Or SrvAny from Microsoft? But yes, a Windows service basically is a console app that does not provide and require any direct user interaction. |
| ||
Winni: While you can make a service out of pretty much any program with those, having 3rd party dependencies like that is still not nearly as good a solution as being able to do it natively. |
| ||
Version 1.10 is available for download from my website. * Added support for Pause and Continue Debugging a Windows Service Windows services cannot be debugged within your IDE so you need some other way of getting debugging information. Luckily help is at hand. You can either write to the Windows Eventlog, or the Windows Debugger. Functions for both are included in the module. To write to the windows event log simply make a call to logevent(). ... logevent( "Checkpoint X" ) ...To use the Windows Debugger (Download it from HERE) and within your code, make a call to debug(). ... debug( "Checkpoint Y" ) ... |
| ||
Windows services cannot be debugged within your IDE so you need some other way of getting debugging information Interesting. I'm pretty sure you could "remote debug" from it, given the correct functionality - and supporting debugger. |
| ||
Probably. Might look at that somewhere down the line. I added the OutputDebugString() API call so that I could use the sysinternals debugger and the beep() API. It does the job at the moment. :) |
| ||
Thanks for the module. I thought i might need it someday and today i did :) Works just like it should |
| ||
After 4 years the link address is not available anymore. Does anyone has this package its_win32service110.zip? This seems to be the only solution to create a windows service application in blitzmax. Thank you. |
| ||
I don't have the 1.10 version unfortunately, but did find the 1.00 on my computer. Here's a backup of the module: http://www.xlsior.org/temp/itspeedway.mod.zip |
| ||
Hi, It is now available for download from my sourceforge page. Cheers, Si... |
| ||
It is now available for download from my sourceforge page. That appears to be the 1.0 version as well... Is the 1.10 update still around? |
| ||
The download still says v1.00, but version 1.10 is available under files. |
| ||
Thanks for the links |