Skip to content
This repository was archived by the owner on Feb 9, 2026. It is now read-only.

Commit 8a26f95

Browse files
committed
Add hooking logic for launcher updates
1 parent c467a40 commit 8a26f95

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
44

5-
A proxy DLL that fixes a race condition in Level Infinite's `VersionServiceProxy.dll` (usually found in AppData miniloader directories) when running under Wine. The bug causes data to be written to named pipes before `ConnectNamedPipe()` is called, resulting in lost initialization data and a deadlock that prevents installations and updates from completing. This issue does not occur on native Windows.
5+
A proxy DLL that fixes a race condition in Level Infinite's `VersionServiceProxy.dll` (usually found in AppData miniloader directories and launcher directories) when running under Wine. The bug causes data to be written to named pipes before `ConnectNamedPipe()` is called, resulting in lost initialization data and a deadlock that prevents installations and updates from completing. This issue does not occur on native Windows.
66

77
## Supported Games
88

@@ -59,6 +59,13 @@ cp version.dll "$WINEPREFIX/drive_c/users/$USER/AppData/Local/nikkeminiloader/"
5959
cp version.dll "$WINEPREFIX/drive_c/users/$USER/AppData/Local/DeltaForceMiniloader/"
6060
```
6161

62+
**Launcher updates:**
63+
64+
For launcher updates, also copy to the launcher folder:
65+
```bash
66+
cp version.dll "$WINEPREFIX/drive_c/NIKKE/Launcher/"
67+
```
68+
6269
### Step 4: Launch the Installer
6370

6471
Run the installer/launcher normally. Installation and updates should now complete successfully.

version.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,26 @@ BOOL WINAPI HookedWriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytes
119119
HMODULE WINAPI HookedLoadLibraryW(LPCWSTR lpLibFileName)
120120
{
121121
HMODULE result = OriginalLoadLibraryW(lpLibFileName);
122-
if (lpLibFileName && wcsstr(lpLibFileName, L"VersionServiceProxy.dll")) {
123-
OriginalWriteFile = (WriteFile_t)HookFunction(L"VersionServiceProxy.dll", "WriteFile", HookedWriteFile);
122+
if (lpLibFileName) {
123+
if (wcsstr(lpLibFileName, L"VersionServiceProxy.dll")) {
124+
void* currentAddress = HookFunction(L"VersionServiceProxy.dll", "WriteFile", HookedWriteFile);
125+
if (currentAddress && currentAddress != (void*)HookedWriteFile) {
126+
OriginalWriteFile = (WriteFile_t)currentAddress;
127+
}
128+
} else if (wcsstr(lpLibFileName, L"service_core.dll")) {
129+
void* currentAddress = HookFunction(L"service_core.dll", "LoadLibraryW", HookedLoadLibraryW);
130+
if (currentAddress && currentAddress != (void*)HookedLoadLibraryW) {
131+
OriginalLoadLibraryW = (LoadLibraryW_t)currentAddress;
132+
}
133+
}
124134
}
125135
return result;
126136
}
127137

128138
void Hook()
129139
{
130140
OriginalLoadLibraryW = (LoadLibraryW_t)HookFunction(NULL, "LoadLibraryW", HookedLoadLibraryW);
141+
HookFunction(L"base.dll", "LoadLibraryW", HookedLoadLibraryW);
131142
}
132143

133144
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)

0 commit comments

Comments
 (0)