本文介绍了如何在Winforms中使用C#访问移动设备(Windows Mobile 6.0或更高版本)驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将文件从开发人员计算机传输到作为手持终端的移动设备.另外,我有一个SD卡,可以用作可移动设备.当我将该SD卡插入PC的插槽时,它用作可移动设备,因此我可以轻松地使用C#DriveInfo类将任何文件复制到SD卡中.但是,当我用USB电缆将手持终端插入PC时,我想访问移动设备中的文件夹和文件,并希望执行相同的操作,例如复制和删除所需的任何文件...

I would like to transfer a file from developer computer to mobile device which is a handheld terminal.Also, I have an SD card which can be used as removable device. When I plugged in that SD Card into PC's slot, it's used as removable device and easily I can copy any file into SD Card using C# DriveInfo class.But, when I plugged in the handheld terminal with USB cable to PC, I would like to reach folders and files in mobile device and want to do same things like copying and deleting any file I wanted...

问题是我无法到达移动设备,因为当我使用System.IO命名空间的DriveInfo类时,它不被视为可移动设备,因此无法使用该选项.

The problem is that I can not reach mobile device because it's not seen as removable device when I used DriveInfo class of System.IO namespace so can not use that option.

伙计们,周围有人遇到过相同的问题或对任何解决方案都知道吗?

Is there anyone around who came across the same problem or has knowledge for any solution, guys?

推荐答案

好吧,我几年前就这样做了,所以我一开始不记得是怎么回事...但记住了:)您可以使用 RAPI 或更高版本 RAPI2 (此版本尚未亲自使用)库来实现.

Ok I done few years ago this so I couldn't remember how at first...but remembered :) You can use RAPI or even newer version RAPI2(this version haven't used personally) library to achieve that.

这篇关于如何在Winforms中使用C#访问移动设备(Windows Mobile 6.0或更高版本)驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 12:56