Skip to content

Is there a simple example of a mod that hooks registry access? #841

Answered by m417z
Anixx asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think there's a mod that demonstrates that. We indeed discussed it on Discord, and I posted a simple example. Posting it here too for reference.

I do have it on my list to try implementing a Registry Redirect mod, but I'm not sure when I'll get to it.

// ==WindhawkMod==
// @id           registry-hook-demo
// @name         registry-hook-demo
// @description  registry-hook-demo
// @version      0.1
// @author       You
// @include      target.exe
// ==/WindhawkMod==

// ==WindhawkModReadme==
/*
# registry-hook-demo
*/
// ==/WindhawkModReadme==

typedef LONG (WINAPI *REGQUERYVALUEEXA)(HKEY hKey,LPCSTR lpValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);

REG…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@Anixx
Comment options

@Anixx
Comment options

@m417z
Comment options

@Anixx
Comment options

@Anixx
Comment options

Answer selected by Anixx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants