Device.GetFileDeployer, méthode
Mise à jour : novembre 2007
Retourne un objet FileDeployer utilisé pour copier des fichiers entre l'appareil et l'ordinateur de bureau.
Espace de noms : Microsoft.SmartDevice.Connectivity
Assembly : Microsoft.SmartDevice.Connectivity (dans Microsoft.SmartDevice.Connectivity.dll)
Syntaxe
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
Valeur de retour
Type : Microsoft.SmartDevice.Connectivity.FileDeployer
Objet de type FileDeployer.
Exceptions
Exception | Condition |
---|---|
DeviceNotConnectedException | L'appareil n'est pas connecté. |
Notes
L'appareil doit être connecté.
Exemples
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");
Autorisations
- Confiance totale accordée à l'appelant immédiat. Ce membre ne peut pas être utilisé par du code d'un niveau de confiance partiel. Pour plus d'informations, consultez Utilisation de bibliothèques à partir de code d'un niveau de confiance partiel.