专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Windows Mobile

求救!通过RAPI从设备复制文件到PC,有知道的吗?解决方法

发布时间:2010-05-30 01:01:10 文章来源:www.iduyao.cn 采编人员:星星草
求救!通过RAPI从设备复制文件到PC,有知道的吗?
’工程引用了“OpenNETCF.Desktop.Communication.dll”
Imports OpenNETCF.Desktop.Communication

Public Class Form1

  Private Sub btnCopyFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCopyFile.Click

  Dim myrapi As New RAPI
  Dim strSource As String = "\My Documents\in.txt" 'PocketPc 这个文件通过ActiveSync能浏览到
  Dim strDestination As String = "E:\in.txt" 'Pc 本机文件

  Try

  ' 连接到设备。
  myrapi.Connect()
  'Do While Not myrapi.DevicePresent
  ' MessageBox.Show("Please connect your device to your PC using ActiveSync and " & _
  ' "before clicking the OK button.", "No Device Present")
  ' myrapi.Connect()
  'Loop

  '从设备复制到计算机
  myrapi.CopyFileFromDevice(strSource, strDestination, True)'这步报错:Could not open remote file

  '从计算机复制到设备
  'myrapi.CopyFileToDevice(strDestination, strSource)

  Catch ex As Exception
  MessageBox.Show(ex.Message.ToString)
  Application.Exit()
  End Try

  End Sub

End Class


有知道的高手指导下吗,不胜感激!

------解决方案--------------------
那只好接分了,给你一个RAPI的例子
http://hi.baidu.com/fenglingtoqq/blog/item/0063f8d3649b6f3f960a1669.html
------解决方案--------------------
CopyFileFromDevices 查一下msdn看看用法
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: