Code Monkey home page Code Monkey logo

wpd's People

Contributors

excitoon avatar geersch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wpd's Issues

Not working anymore with the latest windows updates

Hi - firstly thank you for this great tutorial.

I wanted to tell you that the code is not working anymore after a troublesome windows update
http://forum.notebookreview.com/threads/microsoft-released-a-bad-update-that-broke-mtp-in-windows.802593/

even though windows fixed the issue and we are able to see the device and the SD card connected via usb to the laptop - we are not able to access it anymore. In case you are supporting the code.

Kind regards

Multiple connected devices not possible

It seems the program doesn't work when multiple devices are connected.
In part 1, this line this._deviceManager.GetDevices(ref deviceIds[0], ref count); only gives the first device ID. I'm trying to change it, but it seems the GetDevices method only accepts one string as deviceId and only returns one.

fails accessing Iphone 6

On an Iphone 6, this code fails in wrapobject getting name not found. It appears that my Iphone 6 returns the name only for pid = 12, and not pid = 4. FWIW, a Sony HX-9V camera returns the name for both pids.

For those tinkering, it might be worth noting that pid = 18 returns a string containing the creationdate of the file for image and video files on both of the above

Enumerating WPD Devices

I believe there is an issue with how enumerating WPD Devices are done. I actually have a similar problem with my own program. That I put it on StackOverflow here https://stackoverflow.com/questions/75405142/net-clean-com-dependencie-dll-keeps-resetting-on-clean-in-visual-studio-2022. The problem is that when you get device ids is that you are getting back a string containing all the device ids and when you try and get a count of devices I believe you are getting a maximum of 1 device. If you want to fix it you can do the steps below.

Disassemble the PortableDeviceApi interop using the command -
ildasm Interop.PortableDeviceApiLib.dll /out:pdapi.il

Open the IL in Notepad and search for the following string

instance void GetDevices([in][out] string& marshal( lpwstr) 
pPnPDeviceIDs,

Replace all instances of the string above with the following string

instance void GetDevices([in][out] string[] marshal(lpwstr[]) 
pPnPDeviceIDs,

Save the IL and reassemble the interop using the command -
ilasm pdapi.il /dll /output=Interop.PortableDeviceApiLib.dll

The only problem will be that the Interop.PortableDeviceApiLib.dll will reset after clean. If one of your guys comes up with a solution plz let me know on StackOverflow or even right here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.