koffi 2.5.12 → 2.5.14
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 +5 -0
- package/build/koffi/darwin_arm64/koffi.node +0 -0
- package/build/koffi/darwin_x64/koffi.node +0 -0
- package/build/koffi/freebsd_arm64/koffi.node +0 -0
- package/build/koffi/freebsd_ia32/koffi.node +0 -0
- package/build/koffi/freebsd_x64/koffi.node +0 -0
- package/build/koffi/linux_arm32hf/koffi.node +0 -0
- package/build/koffi/linux_arm64/koffi.node +0 -0
- package/build/koffi/linux_ia32/koffi.node +0 -0
- package/build/koffi/linux_riscv64hf64/koffi.node +0 -0
- package/build/koffi/linux_x64/koffi.node +0 -0
- package/build/koffi/openbsd_ia32/koffi.node +0 -0
- package/build/koffi/openbsd_x64/koffi.node +0 -0
- package/build/koffi/win32_arm64/koffi.node +0 -0
- package/build/koffi/win32_ia32/koffi.node +0 -0
- package/build/koffi/win32_x64/koffi.node +0 -0
- package/package.json +2 -2
- package/src/cnoke/assets/win_delay_hook.c +30 -3
- package/src/cnoke/package.json +1 -1
- package/src/koffi/examples/nwjs/src/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
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
|
@@ -29,14 +29,41 @@
|
|
|
29
29
|
#include <windows.h>
|
|
30
30
|
#include <delayimp.h>
|
|
31
31
|
|
|
32
|
+
static HMODULE node_dll;
|
|
33
|
+
static HMODULE nw_dll;
|
|
34
|
+
|
|
32
35
|
static FARPROC WINAPI self_exe_hook(unsigned int event, DelayLoadInfo *info)
|
|
33
36
|
{
|
|
34
|
-
if (event ==
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
if (event == dliStartProcessing) {
|
|
38
|
+
node_dll = GetModuleHandleA("node.dll");
|
|
39
|
+
nw_dll = GetModuleHandleA("nw.dll");
|
|
40
|
+
|
|
41
|
+
return NULL;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (event == dliNotePreGetProcAddress) {
|
|
45
|
+
if (node_dll) {
|
|
46
|
+
FARPROC ret = GetProcAddress(node_dll, info->dlp.szProcName);
|
|
47
|
+
if (ret)
|
|
48
|
+
return ret;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (nw_dll) {
|
|
52
|
+
FARPROC ret = GetProcAddress(nw_dll, info->dlp.szProcName);
|
|
53
|
+
if (ret)
|
|
54
|
+
return ret;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (event == dliNotePreLoadLibrary && _stricmp(info->szDll, "node.exe") != 0) {
|
|
59
|
+
if (!node_dll) {
|
|
60
|
+
node_dll = GetModuleHandleA(NULL);
|
|
61
|
+
}
|
|
62
|
+
return (FARPROC)node_dll;
|
|
37
63
|
}
|
|
38
64
|
|
|
39
65
|
return NULL;
|
|
40
66
|
}
|
|
41
67
|
|
|
42
68
|
const PfnDliHook __pfnDliNotifyHook2 = self_exe_hook;
|
|
69
|
+
const PfnDliHook __pfnDliFailureHook2 = self_exe_hook;
|
package/src/cnoke/package.json
CHANGED