nagisa / rust_libloading

Bindings around the platform's dynamic library loading primitives with greatly improved memory safety.
https://docs.rs/libloading
ISC License
1.22k stars 100 forks source link

Reflective loading? #145

Open JohnScience opened 5 months ago

JohnScience commented 5 months ago

Hi, I've just published reflective_pe_dll_loader and decided to share this piece of news with you. I don't know if you want to one day support reflective loading but you can salvage some of my code for implementation of reflective loading on Windows.

nagisa commented 5 months ago

That's very interesting, thank you. Do you handle linking at all, or is this limited to dependency-free code?

JohnScience commented 5 months ago

@nagisa

It does support implicit linking but I don't know how to support delay-loaded DLLs.

JohnScience commented 5 months ago

This article seems to implement the same approach and it mentions the limitations: https://www.codeproject.com/Tips/430684/Loading-Win-DLLs-manually-without-LoadLibrary

In the comment section, there is useful advice on how to circumvent those.