0

我是 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 设备连接到的“逻辑驱动器”?

4

1 回答 1

0

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

于 2016-02-12T13:17:38.140 回答