Create "service-like" app
-
Hello all, i have a quick question... i need to create a "service-like" application in c# that will basiclly run in the background with no gui... like a console app that stays open untill the device has reset. any ideas on how i could go accross this? its an app that will monitor the gps data and intercept sms messages that have commands etc... i created a device app but the window will always show up (even though i tried this.hide() and this.visible = false in the onLoad) Cheers!
-
Hello all, i have a quick question... i need to create a "service-like" application in c# that will basiclly run in the background with no gui... like a console app that stays open untill the device has reset. any ideas on how i could go accross this? its an app that will monitor the gps data and intercept sms messages that have commands etc... i created a device app but the window will always show up (even though i tried this.hide() and this.visible = false in the onLoad) Cheers!
Remove the call to
Application.Run
in theMain
function. Instead, put your code inMain
, in the same way that you would write a console application for the desktop. Note that Windows CE (and hence Windows Mobile) only supports 32 processes, some of which are reserved for system processes. You should try not to create too many processes, so that the user isn't restricted too much (Windows CE will close processes that haven't been used recently, but only if they have a window, I believe). There is a model for loading code as a 'service', but this really requires writing your code as a native C++ DLL to a specific service model.Stability. What an interesting concept. -- Chris Maunder