我是Windows Phone开发新手,正在尝试将文件从PC复制到Windows Phone Documents文件夹。我阅读并尝试了这篇文章中所写的Copy files with WPD to Windows Phone C#。最初的文章是https://dzone.com/articles/creating-apis-for-mobile-iot-apps。不幸的是,我在代码行中得到了一个错误的ArgumentException:
targetStream.Write(buffer, bytesRead, pcbWritten);我认为它与参数ParentObjectID有关,当我调用该方法时:
device.TransferContentToDevice(@"H:\temp\QuestPhone\Pesquisas.db",@"G:\Documents");我尝试将"G:\Documents“替换为"Windows Phone:\Documents",以及"Phone:\Documents”和"Windows Phone:\Phone\Documents“,但没有成功。
那么,我如何指定我的Windows Phone设备连接到的“逻辑驱动器”?
发布于 2016-02-12 21:17:38
过了一段时间,我得到了一个解决方案。正确的ParentObjectID是@"o1“。其中o1为设备上documents文件夹的ID。
https://stackoverflow.com/questions/35363270
复制相似问题