Code Monkey home page Code Monkey logo

Comments (3)

szymonwieloch avatar szymonwieloch commented on June 27, 2024

@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.

szymonwieloch avatar szymonwieloch commented on June 27, 2024

@chip5441 Any updates about the issue? Do you still have the problem?

from rust-dlopen.

szymonwieloch avatar szymonwieloch commented on June 27, 2024

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)

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.