Advertisement
Guest User

Untitled

a guest
Nov 16th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.37 KB | None | 0 0
  1. import core.sys.windows.windows; //windows types
  2. import MinHook;
  3. import std.stdio;
  4.  
  5. void work(){
  6.     writeln("I work");
  7. }
  8.  
  9. void intercept(){
  10.     writeln("sneaky intercept");
  11. }
  12.  
  13. void main(){
  14.     //stripped error handling
  15.     MH_Initialize();
  16.     MH_CreateHook(&work,&intercept,null);
  17.     MH_EnableHook(&work);
  18.     work();
  19.     MH_DisableHook(&work);
  20.     work();
  21.     MH_Uninitialize();
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement