在这里可以讨论所有关于Windows Mobile开发的话题,无论是.NET Compact Framework还是C++,无论是SQL Mobile还是Mobile Software Factory。而我唯一的期望就是,大家在问问题的同时,也将自己的经验在这里分享。
我想做个软件让PPC的扩展卡不用ActiveSync就能变U盘的功能,不知道该往哪个方向去做?
各位大侠,高手,都来给小弟提两句啊?谢谢了
大家指点啊
Typing Chinese is too hard, wish you can read English.
In general, this is not an application issue; rather, it’s a device driver issue.
When an OEM develops the PPC device, they need to decide what USB functionalities to support. USB Function (Client), USB Host and USB OTG. All Windows Mobile devices will have to support USB Function. To support USB function, a USB function controller driver has to be developed, which controls the USB controller and USB transceiver hardware. It’s architected as PDD/MDD model. Normally, OEM has to develop the PDD part, while MS takes care of the MDD part. On top of the USB function controller driver, OEM will have to integrate one or more USB function client drivers. Normally, only one client driver, ActiveSync is integrated. That’s why it is acting as an ActiveSync device when you plugged it into a PC.
Now, back to your question, to support the USB drive function, another USB Function Client driver, USB Function Mass Storage Client Driver has to be integrated (note: not developed, if it’s NAND based storage. MS has this driver developed already). After this step, the PC side will recognize the Windows Mobile device as a USB drive.
Another problme,when I have prepared my USB Function Mass Storage Client Driver.How can I realize my function in the application?
Should I design a application to change the driver between Activesync function client driver and USB function client driver?
I am poor in English.Wish you can understand my meaning.
Waiting for your reply again.Thank you very much.
It's different on Windows CE 5 and 6. CE6 has a USB Function Composite Device Driver.
“The USB Function Composite device driver allows a Windows Embedded CE based USB device to perform multiple functions simultaneously. For example, the USB Function Composite device driver allows the use of the USB RNDIS protocol and the USB Mass Storage client driver simultaneously.“
But on CE5, you have to switch the Client Drivers with an application. It calls into the bus driver to force the bus driver unload the Activesync client driver and load Mass Storage Client Driver.
Check this link out for details.
http://msdn2.microsoft.com/en-us/library/aa910127.aspx
但是读卡器要钱,还要随时带
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
"DefaultClientDriver"="Mass_Storage_Class"
把注册表下这个键值改成这样就好了
同步的时候应该是"DefaultClientDriver"="Serial_Class"
原理就像E文中说的
在SDK文档搜索DefaultClientDriver就知道了,当然首先这需要PPC上驱动的支持,APP的作用只是切换,可以改变当前的连接模式(通过IOCTL操作),也可以改变PPC与PC默认的连接方式(修改注册表)
