refactor(native): batch MinHook enable calls and log status codes
Switch ws2_32 and LocalMP hook installers to MH_QueueEnableHook with two MH_ApplyQueued passes (mandatory network hooks first, then all LocalMP modules), reducing DllMain thread-freeze cycles from 26 to 2. Roll back partial module hooks on error and log MH_StatusToString diagnostics to wto_ws.log. Checked: native/wto-net/build.ps1 compiles cleanly with zero warnings in project sources, and PE inspection confirms WS2_32/KERNEL32 imports and 49 exports. In-game verification pending.
This commit is contained in:
1 parent
90bd5a315d
commit
96077153c6
11 files changed
+120
-105
No files matched your search
@@ -82,6 +82,16 @@ void local_mp_add_mplayer_score(uint8_t *mp, float delta, uint32_t event_id);
|
||||
void local_mp_mark_mplayer_dirty(uint8_t *mp);
|
||||
void local_mp_inc_mplayer_stat(uint8_t *mp, size_t off);
|
||||
|
||||
/* Hook descriptor queued by a LocalMP module and enabled in a single batch by local_mp_core.c. */
|
||||
typedef struct LocalMpHookSpec {
|
||||
const char *name;
|
||||
void *target;
|
||||
void *detour;
|
||||
void **original;
|
||||
} LocalMpHookSpec;
|
||||
|
||||
int local_mp_queue_hooks(const char *module, const LocalMpHookSpec *specs, size_t count);
|
||||
|
||||
/* Module hook installers, called by install_local_mp_hooks() once the module's values are loaded. */
|
||||
int install_local_mp_player_hooks(void);
|
||||
int install_local_mp_loadout_hooks(void);
|
||||
|
||||
Reference in new issue
Block a user