C# 使用RAPI将文件从Windows CE设备传输到桌面计算机
我已经为Windows CE设备创建了一个C程序,该程序尝试使用RAPI发送文件。 但是当程序到达或者说是在下面这一行时, 它显示Windows.Forms.dll版本2.0.0.0中的TypeLoad异常错误C# 使用RAPI将文件从Windows CE设备传输到桌面计算机,c#,windows-ce,rapi,C#,Windows Ce,Rapi,我已经为Windows CE设备创建了一个C程序,该程序尝试使用RAPI发送文件。 但是当程序到达或者说是在下面这一行时, 它显示Windows.Forms.dll版本2.0.0.0中的TypeLoad异常错误 using (RemoteDeviceManager r = new RemoteDeviceManager()) 另外,我注意到在我添加了RAPI.dll并刷新了依赖项之后, 我看到添加了另一个Windows.Forms.dll。 现在我有了版本2.0.0.0和3.5.0.0 这是我
using (RemoteDeviceManager r = new RemoteDeviceManager())
另外,我注意到在我添加了RAPI.dll并刷新了依赖项之后,
我看到添加了另一个Windows.Forms.dll。
现在我有了版本2.0.0.0和3.5.0.0
这是我传输文件的代码
using (RemoteDeviceManager r = new RemoteDeviceManager())
{
using (RemoteDevice dev = r.Devices.FirstConnectedDevice)
{
if (dev == null)
{
//nop
}
else
{
string destFolder = dev.GetFolderPath(SpecialFolder.Desktop);
string destFile = destFolder + @"\SharedFolder" + logfileName;
RemoteFile.CopyFileToDevice(dev, destFile, localFilePath, true);
}
}
}
谁能告诉我出了什么事?在我添加这些代码行之前,一切都很正常。
另外,如果您可能要求的话,我正在尝试通过wifi传输文件。RAPI是一个桌面API库。它必须从PC应用程序调用,而不是从CE应用程序调用。设备无法启动通信管道,如果可以,安全隐患将是巨大的