|
@@ -83,9 +83,22 @@ If you installed a native module and found it was not working, you need to check
|
|
|
following things:
|
|
|
|
|
|
* The architecture of the module has to match Electron's architecture (ia32 or x64).
|
|
|
+* `win_delay_load_hook` is not set to `false` in the module's `binding.gyp`.
|
|
|
* After you upgrade Electron, you usually need to rebuild the modules.
|
|
|
* When in doubt, run `electron-rebuild` first.
|
|
|
|
|
|
+### A note about `win_delay_load_hook`
|
|
|
+
|
|
|
+On Windows, by default, node-gyp links native modules against `node.dll`.
|
|
|
+However, in Electron 4.x and higher, the symbols needed by native modules are
|
|
|
+exported by `electron.exe`, and there is no `node.dll` in Electron 4.x. In
|
|
|
+order to load native modules on Windows, node-gyp installs a [delay-load
|
|
|
+hook](https://msdn.microsoft.com/en-us/library/z9h1h6ty.aspx) 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). As such, on Electron 4.x and higher,
|
|
|
+`'win_delay_load_hook': 'true'` is required to load native modules.
|
|
|
+
|
|
|
## Modules that rely on `prebuild`
|
|
|
|
|
|
[`prebuild`](https://github.com/mafintosh/prebuild) provides a way to
|