Do "windows service" apps exist on windows mobile

  • Thread starter Thread starter Mike Margerum
  • Start date Start date
M

Mike Margerum

Can I build a windows service in C++ to run on a windows mobile device?

I have a small C++ windows mobile application that shuttles data between
a windows mobile device and an HTTP server. I need this program to
always be running. I don't want this application to be terminated by
windows mobile when its looking to free up memory.

Is there any way to do this on windows mobile?

Thanks!
 
Not a service in the same format, code-wise, as on desktop Windows, no.
There are things called 'services' in Windows Mobile/Windows CE, but they
are pretty much stream drivers. Look up Windows CE services, I would think,
on MSDN.

Paul T.
 
Usually one would write a console app or a app where you can control the
message pump so the UI isn't shown until required. You normally hide the app
from the memory applet so it can't be killed. You would also place a
shortcut in the start menu for it to load when the device boots.
 
The memory applet lists all top-level windows, by the window caption. If
your window is hidden, it won't appear.

Paul T.
 
As Paul says :)

One thing to also bear in mind if you are targetting WM6.1 devices and later
that Microsoft ship a task manager so the user is able to kill any
application. You could handle the Closing event here and prevent the app from
closing.
 
Back
Top