Wince中的服务变化

这里所说的服务就是字面上所表达的意思,不过从wince5=>wince6=>wince6 r3有一些变化,引用微软的原文(引用一)如下:
Servicesd.exe is a process that acts as a host to service dynamic-link libraries (DLLs). Long-running services that do not need direct access to hardware or kernel functions such as the TCP stack should be hosted by servicesd.exe rather than in the kernel. Servicesd.exe provides enhanced loading capabilities, such as support for starting, pausing, and stopping services. The process of services.exe, which functions as the host process of services DLLs prior to Windows Embedded CE 6.0 R2, now only acts as a command-line interpreter.
To add this feature to your OS, see Servicesd.exe Catalog Items and Sysgen Variables.
For reference information, see Servicesd.exe Reference.
Sample application code is available at %_WINCEROOT%\Public\Servers\Sdk\Samples\obex, %_WINCEROOT%\Public\Servers\Sdk\Samples\http, %_WINCEROOT%\Public\Servers\Sdk\Samples\msmq, %_WINCEROOT%\Public\Servers\Sdk\Samples\ftpd, %_WINCEROOT%\Public\Servers\Sdk\Samples\services, %_WINCEROOT%\Public\Servers\Sdk\Samples\telnetd.
Source code for this feature is available at %_WINCEROOT\ private\winceos\coreos\device\udevice.
分析:
1、servicesd.exe是管理各种服务的内核进程,原来的services.exe变成了一个命令行的解释器用于调试服务,如果想了解应用如何加载、注销、启动、停止服务的,可以看services.exe的实现。需要注意的是,服务对应的DLL在bib中的属性不能有内核标志(K),否则应用是无法操作成功的。
2、独立服务(standalone service)在wince6 r3中已取消(在public\common\sdk\inc\service.h中SERVICE_INIT_STANDALONE标志已被注释掉),这意味着在开发服务的时候要更加小心,避免引起连锁反应。相应的,注册表信息也有所变化。微软提供了一个finger例程(引用二)尽管是wince5的,但大部分内容还是可以借鉴的。
3、从实现来看,wince下的服务和桌面版完全不同。前者和流驱动类似,后者基本上以COM组件方式实现。
补充:
服务被nk.exe和servicesd.exe各引用了一次
引用:
1、https://msdn.microsoft.com/zh-SG/library/ee499183
2、https://msdn.microsoft.com/zh-cn/library/aa446909.aspx
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值