dokan-rust icon indicating copy to clipboard operation
dokan-rust copied to clipboard

How to customize dokan1.dll dependencies?

Open FirTech opened this issue 3 years ago • 3 comments

I tried to embed Dokany into my application, but after importing "dokan-rust", the program will forcefully request "dokan1.dll", and the main() entry is not executed, so the dll cannot be released in the main() function, is there any How to customize the dependencies of "dokan1.dll"?

FirTech avatar Apr 08 '22 07:04 FirTech

dokan1.dll dependence cannot be customized but you could dynamically import dokan-rust when needed so that dokan1.dll is only requested when you know it is available to your app.

Liryna avatar Apr 08 '22 11:04 Liryna

How to dynamically import dokan-rust? I tried to extract the relevant code using dokan to a location other than main, but it still doesn't work, it seems that as long as the relevant code using dokan is used in the program, dokan1.dll will be requested.

FirTech avatar Apr 08 '22 15:04 FirTech

I don't have rust knowledge to provide guidance sorry but I imagine you will need to dynamically load dokan-rust library by using rust standard API and therefore not directly link with it. There must be some examples on stackoverflow to do that.

Liryna avatar Apr 08 '22 22:04 Liryna