; These registry entries load the battery driver. The IClass value must match
; the BATTERY_DRIVER_CLASS definition in battery.h -- this is how the system
; knows which device is the battery driver. Note that we are using
; DEVFLAGS_NAKEDENTRIES with this driver. This tells the device manager
; to instantiate the device with the prefix named in the registry but to look
; for DLL entry points without the prefix. For example, it will look for Init
; instead of BAT_Init. This allows the prefix to be changed in the registry (if
; desired) without editing the driver code.
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Battery]
"Prefix"="BAT"
"Dll"="battdrvr.dll"
"Flags"=dword:8 ; DEVFLAGS_NAKEDENTRIES
"Order"=dword:0
重新编译.链接后. 运行新的CE工程. 从串口不断输出信息(这些信息是我在CE5自带的电池驱动中每个函数加上去的. 目的是跟踪作用.):
BatteryAPIGetSystemPowerStatusEx2 be called.
LockBatery -- sbattif.c
UnlockBaatery -- sbattif.c
......
BatteryAPIGetSystemPowerStatusEx2 be called.
LockBatery -- sbattif.c
UnlockBaatery -- sbattif.c
说明CE系统不停地检查电池状况. 这种情况是否正常?
另外.我点击CE系统的"控制面板"中的"电源属性"后. 串口输出信息:
CTLPNL: cmdline=\Windows\cplmain. cpl,5
-->>>CTLPNL:CPL='\wINDOWS\CPLMAIN.CPL' icon=5 tab=0
要过大概20秒后才弹出电源属性的窗口. 选择该窗口的按钮也要20秒后才有反应. 很不正常.