How can I programmatically prevent the PC connected to a handheld device from file syncing (grabbing files from the device)?

佐手、 提交于 2019-12-24 05:47:32

问题


As noted here, I added code to my handheld app to (attempt to) prevent certain types of files (by extension) from being synced to the PC. But this doesn't work if the user, on the PC, uses ActiveStync to enable file sharing. On doing so, regardless of handheld registry settings, it copies files from the handheld to the PC (from the handheld's \My Documents folder to the PC's C:\Users\clay\Documents\Documents on Clay's Device folder).

Is there a way to programmatically prevent (on the handheld/Windows CE side) this syncing from taking place? Or is it just a matter of the user reaping what they sow when they select file syncronization?

UPDATE

See this (I'm not completely preventing syncing, but I'm preventing the syncing of the files that I don't want to have synced, by making sure that the FileSyncPath registry key does not match where I am saving the data in question).

来源:https://stackoverflow.com/questions/28334423/how-can-i-programmatically-prevent-the-pc-connected-to-a-handheld-device-from-fi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!