Comments (3)
The problem indeed seems to be those garbled characters in pacman.exe
description. That's a problem with the executable itself. Then, in order to deal with these, the library should be able to deal with an UTF16 error, which doesn't seem hard to implement.
But anyway, please post your source code, so I can have an idea of what's really going on.
from winsafe.
Just open a handle to that process and try to get the image name:
let process = w::HPROCESS::OpenProcess(co::PROCESS::QUERY_LIMITED_INFORMATION, false, pid)?;
let full_path = process.QueryFullProcessImageName(co::PROCESS_NAME::WIN32)?;
Since that function already returns a Result, it should ideally propagate the encoding errors the same way rather than panicking
from winsafe.
I implemented a specific error treatment for invalid UTF-16 strings, which should not panic anymore.
Let me know if this works.
from winsafe.
Related Issues (20)
- `WC::NoValue`? HOT 1
- I don't think `MultiByteToWideChar` and `WideCharToMultiByte` need to add 1 to `num_bytes` HOT 4
- resizable_layout not work as expect HOT 8
- When the new_dlg function is used to create a window, the wm_create event does not work HOT 6
- Async IO should be marked as "unsafe" HOT 1
- CreateToolhelp32Snapshot error when compiling for x86
- How to set up a transparent window? HOT 1
- please font settings HOT 7
- Add missing API to open app in foreground? HOT 3
- Possible ShellExecuteEx implementation HOT 8
- Linker errors in Windows 7
- Add support for raw-window-handle HOT 3
- Can't run library tests on 0.0.21 HOT 8
- WM_CHAR event does not arrive in custom control HOT 6
- ERROR(0x0078 120) This function is not supported on this system. HOT 4
- Exit code 127 on startup after upgrading to v0.0.21 HOT 7
- Never sets `class name` correctly for window HOT 1
- Fixing `RegQueryValueEx` seems to affect `RegGetValue` HOT 2
- Optional Parameters in API Bindings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winsafe.