网上有很多介绍wm下使用c++设计Service的文章,但是用c#模拟Service的文章特少。
C#利用 ManagedService模拟Service
Managed Services for Windows Mobile http://www.codeplex.com/managedserviceswm
模拟程序的关键:http://managedserviceswm.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=19508#DownloadId=49412 会下载到 Binary_Only.zip 解压缩后在wm系统中安装 ManagedServicesInstaller.CAB 安装后系统就有了模拟Service的能力了,很多朋友就是这个文件没有安装造成了程序不能随系统的启动一起启动。
在程序中添加引用ManagedService.dll