koffi 2.5.17 → 2.5.18-beta.1

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.
package/CHANGELOG.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ### Koffi 2.5
6
6
 
7
- #### Koffi 2.5.17 (2023-08-27)
7
+ #### Koffi 2.5.18 (2023-08-27)
8
8
 
9
9
  - Fix compatibility with Electron
10
10
 
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.17",
4
- "stable": "2.5.17",
3
+ "version": "2.5.18-beta.1",
4
+ "stable": "2.5.16",
5
5
  "description": "Fast and simple C FFI (foreign function interface) for Node.js",
6
6
  "keywords": [
7
7
  "foreign",
@@ -31,18 +31,13 @@
31
31
 
32
32
  static FARPROC WINAPI self_exe_hook(unsigned int event, DelayLoadInfo *info)
33
33
  {
34
- static const wchar_t *const NodeLibraries[] = {
35
- L"node.dll",
36
- NULL
37
- };
38
-
39
34
  if (event == dliNotePreLoadLibrary && !stricmp(info->szDll, "node.exe")) {
40
- for (int i = 0; i < sizeof(NodeLibraries) / sizeof(*NodeLibraries); i++) {
41
- const wchar_t *name = NodeLibraries[i];
42
- HMODULE h = GetModuleHandleW(name);
43
-
44
- if (h)
45
- return (FARPROC)h;
35
+ if (GetModuleHandleW(L"nw.dll")) {
36
+ HMODULE h = GetModuleHandleW(L"node.dll");
37
+ return (FARPROC)h;
38
+ } else {
39
+ HMODULE h = GetModuleHandleW(NULL);
40
+ return (FARPROC)h;
46
41
  }
47
42
  }
48
43
 
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.17",
382
- stable: "2.5.17",
381
+ version: "2.5.18-beta.1",
382
+ stable: "2.5.16",
383
383
  description: "Fast and simple C FFI (foreign function interface) for Node.js",
384
384
  keywords: [
385
385
  "foreign",