![]() ![]() Prebuild provides a way to publish native Node modules with prebuilt binaries for multiple versions of Node and Electron. See node-gyp for an example delay-load hook if you're implementing your own. If the hook is set up in a dependent DLL, it won't fire at the right time. win_delay_load_hook.obj is linked directly into the final DLL. ![]() If the node.exe link is not delayed, then the delay-load hook won't get a chance to fire and the node symbols won't be correctly resolved. you include the flag /DELAYLOAD:node.exe.If you link against the wrong node.lib you will get load-time errors when you require the module in Electron. you link against node.lib from Electron and not Node.Your link.exe invocation should look like this: If the module is built with another system, you'll need to ensure that you build with a delay-load hook installed in the main. ![]() If the module is built with node-gyp, ensure that the win_delay_load_hook variable is set to true in the binding.gyp file, and isn't getting overridden anywhere. Procedure could not be found, it may mean that the module you're trying to use did not correctly include the delay-load hook. If you get an error like Module did not self-register, or The specified As such, on Electron 4.x and higher, 'win_delay_load_hook': 'true' is required to load native modules. In order to load native modules on Windows, node-gyp installs a delay-load hook that triggers when the native module is loaded, and redirects the node.dll reference to use the loading executable instead of looking for node.dll in the library search path (which would turn up nothing). However, in Electron 4.x and higher, the symbols needed by native modules are exported by electron.exe, and there is no node.dll. On Windows, by default, node-gyp links native modules against node.dll.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |