https://github.com/petabyt/libwpd
Windows Portable Devices (WPD) translation layer for communicating with PTP/MTP devices on Windows
https://github.com/petabyt/libwpd
mtp ptp windows
Last synced: 9 months ago
JSON representation
Windows Portable Devices (WPD) translation layer for communicating with PTP/MTP devices on Windows
- Host: GitHub
- URL: https://github.com/petabyt/libwpd
- Owner: petabyt
- License: mit
- Created: 2023-02-02T03:29:15.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-04-06T01:59:05.000Z (over 1 year ago)
- Last Synced: 2025-09-17T04:54:08.295Z (10 months ago)
- Topics: mtp, ptp, windows
- Language: C++
- Homepage:
- Size: 163 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libwpd
POSIX-friendly abstraction over [Windows Portable Devices](https://learn.microsoft.com/en-us/windows/win32/windows-portable-devices). This makes it easier to port libusb software (specifically PTP/USB clients) to Windows.
## Compiling
With MinGW on Linux:
```
cmake -DCMAKE_TOOLCHAIN_FILE=mingw.cmake -G Ninja -B build
cmake --build build
```
## How to use
The DLL is written in Win32 C++, but exposes a basic C API. See `test.c` for a basic example of usage.
`libwpd.h` includes the entirity of the API.
## Limitations
- OpenSession and CloseSession opcodes are ignored. Windows wants complete control over sessions, so we can't run those opcodes. A fake 0x2001 PTP_RC_OK response is sent back for compatibility.
- Transaction IDs are not handled. I don't think WPD lets you have that information.