Questions tagged [wpd]

Windows Portable Devices (WPD) enables computers to communicate with attached media and storage devices.

Windows Portable Devices (WPD) enables computers to communicate with attached media and storage devices.

WPD provides a way for computers to communicate with music players, storage devices, mobile phones, cameras, and many other types of connected devices.

Applications that are built on WPD can explore a device, send and receive content, and even control the device, for example, take a picture or send a text message. The system is designed to be flexible so that many types of devices can be explored, and extensible so that driver developers can define custom properties and commands for custom devices.

Reference

101 questions
0
votes
0 answers

WPF Conditional validation depending on commands

How do you implement conditional validation in a WPF application? In this case the validation is based on user intention, not other property values. When the user issues an Approve command then a particular property must be present. An error…
0
votes
1 answer

How to tell digital camera from other devices using WPD and using Setup API

I've got 2 tasks: a) distinguish digital cameras from other MTP-devices, obtained by IPortableDeviceManager::GetDeviceList; b) I want to find connected digital cameras with Setup API. My thought was to get all USB devices…
Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335
0
votes
0 answers

Windows Portable Devices (WPD), C#: How to set "date modified" when creating a file on Portable Device

If i copy a file from Windows10 with WindowsExplorer to my moto G6 phone, the new created file have imediately the correct ModifyDate like the original file on Windows. Java File.setLastModified() from an app on moto device works also. I tested to…
Cor
  • 389
  • 1
  • 2
  • 14
0
votes
1 answer

PortableDeviceApiLib show progress TransferContentToDevice()

I am using https://www.nuget.org/packages/PortableDevices/ to copy files to WPD. I can copy files using TransferContentToDevice(___,___) function. Right now, it's not showing any progress dialog. How can I show transfer progress? My Code …
Xihuny
  • 1,410
  • 4
  • 19
  • 48
0
votes
0 answers

Disable portable device in windows

I am trying to disable portable device using setupdixxx APIs and device is getting blocked and no device content is visible. I want device to be in disable state and no content should be visible. But its content is getting visible when I try to…
Mr_Aj
  • 1
  • 1
0
votes
1 answer

How to create folder in MTP device by c# windows application?

I'm trying to transfer files to android MTP device in windows app made with C#. How do i create folder on MTP device in windows app? I'm using WPD API and I succeeded in sending the file to the MTP device. var WPD_OBJECT_PARENT_ID = new…
jun
  • 11
  • 4
0
votes
1 answer

How to close Windows Portable Device IStream opened in Python / pythoncom / comtypes

I'm using Windows Portable Device in python with pythoncom and comtypes. I'm in trouble because when I request for WPD_RESOURCE_THUMBNAIL resource, some android devices returns a "square" thumbnail while the raw image has 16:9 format (or…
shakraw
  • 39
  • 7
0
votes
1 answer

How to get filtered target device information from windows upper class filter

I'm writing a upper class filter for WPD device. I specified the callback functions for the Read/Write/Ioctl, from the callback declaration I could get the WDFQueue, WDFRequest. VOID WdfFltrDeviceControl(IN WDFQUEUE Queue, IN WDFREQUEST Request, IN…
Coney
  • 65
  • 4
0
votes
0 answers

IPortableDeviceEventCallback doesn't work properly (strange behaviour)

I want to receive a callback in my application when a photo on a connected mobile phone was shot (WPD_EVENT_OBJECT_ADDED). I implemented a WPD client and the IPortableDeviceEventCallback like shown in the Windows Dev Center. Now my problem is that…
RobRobRob
  • 67
  • 2
  • 10
0
votes
1 answer

WPD get media dimensions

I want to get the width and hight of a image file on a WPD via IPortableDeviceValues. According to the Windows Dev Center every object whose type is WPD_CONTENT_TYPE_IMAGE (which they are) requires to provide WPD_MEDIA_WIDTH/WPD_MEDIA_HEIGHT but I…
RobRobRob
  • 67
  • 2
  • 10
0
votes
1 answer

Including PortableDevice.h causes a lot of errors

I read this article and just created a cpp console project in VisualStudio 2017 including some headers. stdafx.h: #pragma once #include "targetver.h" #include #include #include #include…
0
votes
1 answer

How to get root directory of the device from WPD API?

I want to get all root directories for MTP USB devices (I can identify them as GUID) from WPD API. So my question is: How I can do this? Any code snippets will be appreciated.
Szyk Cech
  • 1
  • 1
0
votes
1 answer

How to enumerate MTP and PTP devices

This answer explains how to use WMI to find attached USB mass storage devices by drive letter but I am trying to find the names of (or UNC paths to) attached MTP or PTP devices, such as attached cameras or mobile devices which are mounted without a…
Ilkka
  • 21
  • 1
  • 5
0
votes
1 answer

How to transfer file to Android Device without drive letter using WPD

Excuse me for my bad english, please help me solve this problem. I able to retrieve file from Android Device using WPD but failed to transfer back to Android Device. I followed the tutorial in https://dzone.com/articles/windows-portable-devices-0…
0
votes
1 answer

How to copy files from path to WPD or MTP device

I'm using VB.NET to create a video copying application. I can easily copy the files I need from path to USB, but I am having trouble doing the same with portable devices such as phones. So far I was able to find and connect the phone using the code…
Hucen Farhan
  • 243
  • 1
  • 3
  • 10