Theme
Injector CLI
wildm_inject.exe (source injector/wildm_inject.c) loads the WildM client DLL into Ghost Recon Wildlands without modifying any game file — the same principle as FiveM. It is installed next to dinput8.dll in %USERPROFILE%\WildM\client\ and run by the launcher.
Usage
text
wildm_inject.exe --url <platform-url> <path\to\dinput8.dll>
wildm_inject.exe <path\to\GRW.exe> <path\to\dinput8.dll> [game arguments…]--url mode (used by the launcher)
text
wildm_inject.exe --url uplay://launch/1771/0 "%USERPROFILE%\WildM\client\dinput8.dll"
wildm_inject.exe --url steam://rungameid/460930 "%USERPROFILE%\WildM\client\dinput8.dll"- Refuses to start if a
GRW.exeis already running. - Opens the URL with
ShellExecuteW: the game is launched normally by its platform, which checks the licence. - Watches for a new
GRW.exeprocess for up to 3 minutes (Ubisoft Connect can be slow). - As soon as it appears, loads the DLL with a remote thread on
LoadLibraryWand verifies the module is present (full path comparison). - Keeps watching that process for 20 s: if it exits and another
GRW.exeappears (Ubisoft Connect relaunching the game throughUbisoftGameLauncher), it injects the new one.
Direct mode (development)
- Refuses to start if a
GRW.exeis already running. CreateProcessW(GRW.exe, CREATE_SUSPENDED)with the game folder as working directory and the extra arguments appended.- Writes the DLL path into the process and queues
LoadLibraryWas an APC on the main thread, so it runs during process initialisation, before any game code; thenResumeThread. - Checks for up to 60 s that the client is loaded. If the process exits and Ubisoft Connect relaunches the game, the new
GRW.exeis injected with a remote thread.
In both modes, when the game later loads dinput8.dll by name, Windows returns the module already in memory — the WildM proxy.
Output
Exactly one line on stdout, read by the launcher:
| Output | Exit code | Meaning |
|---|---|---|
OK pid=<pid> mode=url | 0 | Injected (--url mode) |
OK pid=<pid> mode=demarrage | 0 | Injected at start-up (direct mode) |
OK pid=<pid> mode=relance | 0 | Injected after a relaunch by Ubisoft Connect (direct mode) |
ERR usage: … | 2 | Wrong arguments |
ERR dll introuvable | 3 | The DLL path does not exist |
ERR GRW.exe tourne deja : ferme le jeu avant de rejoindre un serveur | 4 | The game is already running |
ERR lancement <url> / ERR CreateProcess <code> | 5 | Could not open the URL / start the game |
ERR injection <code> | 6 | Could not queue the APC (the suspended game is terminated) |
ERR relance via Ubisoft Connect : injection impossible | 7 | Relaunch detected but injection failed |
ERR le jeu n'a pas demarre (ou injection impossible) / ERR le client ne s'est pas charge dans le jeu | 8 | Timeout |
The launcher runs it with a 240 s timeout and shows Lancement du jeu : <message> for any ERR.
Building
Plain Win32 C, no dependencies beyond shell32 (for ShellExecuteW). It is built together with the client into grw-mp/build/ by the client agent.