1

i am trying to run the WPDApiSample. When i run the application it prompts me to enter the device number, i enter the device number then it prompts me to enter what i want. I want to send a content from device. so i select option 3. After that it asks me to give the identifier of the object which i want to transfer. (Is identifier is the name of the directory on the phone? How can i move a specific mp3 file, which is located in music directory ?) i enter the name of the directory, then it says that [Failed to get Istream]. What am i doing wrong ? What is correct input?

Thanks in advance.....

Ahsan
  • 87
  • 1
  • 10

1 Answers1

2

select option 2 to enumerate (list) content present on the device. you may also use option 12 afterwards to read properties of a specific object/item.

sabir
  • 76
  • 4
  • thanks for replying. I have already figured it out already. Now i have another problem. How can i specify the destination path for the content which will be transferred to the PC from device? And another question, can we send music file in any format using WPD (.mp3) and other video formats too ? – Ahsan Jun 04 '14 at 13:30
  • use any directory on PC e.g. d:\temp\ – sabir Jun 04 '14 at 13:48
  • Thanks, but i could not figure it out still. how and where i can give the path in the function "TransferContentFromDevice" . kindly show me the way programatically..... – Ahsan Jun 05 '14 at 06:35
  • sample is probably outputting to directory where executable is residing. search "SHCreateStreamOnFile(strOriginalFileName" in the mentioned function. strOriginalFileName is the path of output file. – sabir Jun 05 '14 at 08:04
  • BTW, sample is just a sample. you'll have to write your own code on basis of it. there is no quick substitute/replace approach to it. – sabir Jun 05 '14 at 08:06
  • thanks sabir very much. obviously i have to write my own code. but first of all i should have to understand implementation of sample. because i am totally naive at WPD :) Now i want to attach 2 devices and want to get their device objects for further manipulation at a time. can i achieve this ? or WPD works on a single device at a single time ? any comment ? – Ahsan Jun 05 '14 at 10:54
  • what is ur project? email me details. – sabir Jun 06 '14 at 09:37
  • dear sabir, i just want to transfer files between two devices. right now i have two device objects. and i am trying to send a music file from 1 device to another. i am geting inputStream from the transferContentFromDevice, and sending to transferContentToDevice function. but i am getting trouble to set the properties on the finalOutputFileStreamobject , how can i get the properties from inputStreamObject to set the properties on the finalobjectStream ? – Ahsan Jun 06 '14 at 10:49