Skip to content

Conversation

@swbsi
Copy link
Contributor

@swbsi swbsi commented Oct 30, 2024

The convention of GetModuleHandle(NULL) in addon delay load handlers (https://github.com/nodejs/node-gyp/blob/e6f4ede10cca28e9edeaa85d7830914c5d1499c7/src/win_delay_load_hook.cc#L31) does not work when node is built as a shared library on windows in an embedding scenario, since the napi_* APIs are then defined in a dll, not the host exe.

@swbsi swbsi requested a review from a team as a code owner October 30, 2024 15:34
@aruniverse aruniverse closed this Apr 25, 2025
@aruniverse aruniverse deleted the delay-load-for-embedding branch April 25, 2025 14:37
@khanaffan khanaffan restored the delay-load-for-embedding branch April 25, 2025 14:47
@khanaffan khanaffan reopened this Apr 25, 2025
@aruniverse
Copy link
Member

@jffmarker is this still needed?

@jffmarker
Copy link
Member

@swbsi do we still need this chnage?

@swbsi
Copy link
Contributor Author

swbsi commented Apr 29, 2025

@swbsi do we still need this chnage?

We now have the napi api exposed through the mstn exe. So, we do not need this for local sync presently.

However, to keep pace with the addon ecosystem, we should probably make the change. Node-gyp has added support for libnode.dll, for example (nodejs/node-gyp#2834).

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.

4 participants