koffi 2.5.18-beta.2 → 2.5.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koffi",
3
- "version": "2.5.18-beta.2",
4
- "stable": "2.5.16",
3
+ "version": "2.5.18",
4
+ "stable": "2.5.18",
5
5
  "description": "Fast and simple C FFI (foreign function interface) for Node.js",
6
6
  "keywords": [
7
7
  "foreign",
@@ -29,16 +29,21 @@
29
29
  #include <windows.h>
30
30
  #include <delayimp.h>
31
31
 
32
+ static HMODULE node_dll;
33
+
32
34
  static FARPROC WINAPI self_exe_hook(unsigned int event, DelayLoadInfo *info)
33
35
  {
34
- if (event == dliNotePreLoadLibrary && !stricmp(info->szDll, "node.exe")) {
35
- HMODULE h = GetModuleHandle("node.dll");
36
- if (!h) {
37
- h = GetModuleHandle(NULL);
36
+ if (event == dliStartProcessing) {
37
+ node_dll = GetModuleHandleA("node.dll");
38
+ if (!node_dll) {
39
+ node_dll = GetModuleHandle(NULL);
38
40
  }
39
- return (FARPROC)h;
41
+ return NULL;
40
42
  }
41
43
 
44
+ if (event == dliNotePreLoadLibrary && !stricmp(info->szDll, "node.exe"))
45
+ return (FARPROC)node_dll;
46
+
42
47
  return NULL;
43
48
  }
44
49
 
package/src/index.js CHANGED
@@ -378,8 +378,8 @@ var require_package = __commonJS({
378
378
  "build/dist/src/koffi/package.json"(exports2, module2) {
379
379
  module2.exports = {
380
380
  name: "koffi",
381
- version: "2.5.18-beta.2",
382
- stable: "2.5.16",
381
+ version: "2.5.18",
382
+ stable: "2.5.18",
383
383
  description: "Fast and simple C FFI (foreign function interface) for Node.js",
384
384
  keywords: [
385
385
  "foreign",
@@ -16,6 +16,6 @@
16
16
  "esbuild": "^0.18.17"
17
17
  },
18
18
  "dependencies": {
19
- "koffi": "2.5.17"
19
+ "koffi": "^2.5.18"
20
20
  }
21
21
  }
@@ -32,6 +32,6 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "electron-squirrel-startup": "^1.0.0",
35
- "koffi": "^2.5.17"
35
+ "koffi": "^2.5.18"
36
36
  }
37
37
  }
@@ -11,6 +11,6 @@
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
13
  "esbuild": "^0.18.17",
14
- "koffi": "^2.5.17"
14
+ "koffi": "^2.5.18"
15
15
  }
16
16
  }
@@ -5,6 +5,6 @@
5
5
  "author": "Niels Martignène <niels.martignene@protonmail.com>",
6
6
  "license": "MIT",
7
7
  "dependencies": {
8
- "koffi": "^2.5.17"
8
+ "koffi": "^2.5.18"
9
9
  }
10
10
  }