Device.GetFileDeployer 方法
更新:2007 年 11 月
返回一个用于在设备与台式计算机之间复制文件的 FileDeployer 对象。
命名空间: Microsoft.SmartDevice.Connectivity
程序集: Microsoft.SmartDevice.Connectivity(在 Microsoft.SmartDevice.Connectivity.dll 中)
语法
声明
Public Function GetFileDeployer As FileDeployer
用法
Dim instance As Device
Dim returnValue As FileDeployer
returnValue = instance.GetFileDeployer()
public FileDeployer GetFileDeployer()
public:
FileDeployer^ GetFileDeployer()
public function GetFileDeployer() : FileDeployer
返回值
类型:Microsoft.SmartDevice.Connectivity.FileDeployer
一个 FileDeployer 类型的对象。
异常
异常 | 条件 |
---|---|
DeviceNotConnectedException | 未连接设备。 |
备注
必须连接该设备。
示例
Dim fd As FileDeployer = device.GetFileDeployer()
' Copy file from device to desktop.
fd.ReceiveFile("\\windows\\Alarm1.wav", ".\\Alarm1.wav")
' Copy file from desktop to device.
fd.SendFile(".\\Alarm1.wav", "\\Program Files\\Alarm1.wav")
FileDeployer fd = device.GetFileDeployer();
// Copy file from device to desktop.
fd.ReceiveFile("\\windows\\Alarm1.wav", ".\\Alarm1.wav");
// Copy file from desktop to device.
fd.SendFile(".\\Alarm1.wav", "\\Program Files\\Alarm1.wav");
权限
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。