Skip to content

dln: LoadLibraryExW with LOAD_WITH_ALTERED_SEARCH_PATH - #7

Open
Largo wants to merge 1 commit into
masterfrom
dln-loadlibraryex
Open

Largo wants to merge 1 commit into
masterfrom
dln-loadlibraryex

Conversation

@Largo

@Largo Largo commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Modernizes the Windows native-extension loader from legacy LoadLibraryW to LoadLibraryExW with LOAD_WITH_ALTERED_SEARCH_PATH, so the .so's own directory is searched first for its transitive DLL imports. Gems that ship DLLs next to the .so are then found without walking PATH.

Wall-clock impact in this setup is noise — the gtk3 dependencies live in ucrt64/bin via PATH, not beside the .so. Proposed anyway as the recommended form on Win10+.

Windows-only. Not built or tested on Windows CI — measured in a local MSYS2/UCRT64 VM.

Modernizes the Windows native-extension loader from legacy LoadLibraryW
to LoadLibraryExW with LOAD_WITH_ALTERED_SEARCH_PATH. The .so's own
directory is searched first for its transitive DLL imports — gems that
bundle DLLs alongside the .so are found without walking PATH.

Wall-clock impact in this setup is noise (deps for gtk3 live in
ucrt64/bin via PATH, not next to the .so). Kept anyway as the
recommended form on Win10+.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant