WPD C#Windows Phone

时间:2016-02-12 12:58:41

标签: c# windows-phone-8.1 wpd

我是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" by" Windows Phone:\ Documents"," Phone:\ Documents"和" Windows Phone:\ Phone \ Documents"但没有成功。

那么,如何指定"逻辑驱动器"我的Windows Phone设备连接到哪里?

1 个答案:

答案 0 :(得分:0)

过了一段时间我得到了一个解决方案。正确的ParentObjectID是@“o1”。 “o1”是设备上文档文件夹的ID。