Comments (3)
@chip5441
Hi! Thank you for your report. I am not sure if I got you correctly. I understand that you do something like this:
Library::open(path)
In the first case you use OsStr and it works, in the second case you use normal &str and it does not work?
The only explanation that comes to my mind is a problem with encoding string that is the argument to this function. Try to debug your code by printing out your argument and a conversion of str to OsStr. Something like this:
let your_str: &OsStr = ...<whatever>
let normal_str: &str = "c:\the\full\path.dll"; //this is the path that works.
let normal_str_converted: & OsStr = normal_str.as_ref();
println!("your={:?}, normal={:?}, converted={:?}", your_str, normal_str, normal_str_converted);
If your argument and converted are equal, then there is no reason for the library to fail. In this case please paste here your simplified code and I will try to fix this. But I suspect that you simply pass an invalid argument to the Library::open() function and this is why it does not work.
Regards!
from rust-dlopen.
@chip5441 Any updates about the issue? Do you still have the problem?
from rust-dlopen.
No response for two weeks, closing because it was probably just a problem caused by providing invalid string to the library.
from rust-dlopen.
Related Issues (20)
- Publish `dlopen_derive` 0.1.4
- Add address information to the raw API.
- Add a function to the raw Library that would return module (library) path.
- Create one best safe API.
- Create a framework for plugins.
- Add ability to change dll search path from within the process HOT 4
- Safety against obtaining function pointers to functions removed by dlclose?
- Re-Export the derive macro from the dlopen crate HOT 1
- Typo in error message
- Reformat the markdown to compliance
- Public fields for derive(WrapperApi) HOT 2
- Loading with RTLD_GLOBAL
- Increase verbosity of SymbolGettingError
- Panic due to double SymInitializeW HOT 1
- Get base address directly from Library
- Copy documentation to functions generated by #[derive(WrapperApi)] HOT 1
- Add dependencies to the readme
- `dlerror` *is* thread-safe on some platforms HOT 1
- Usage in no-std environment?
- Is `rust-dlopen` maintained? 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 rust-dlopen.