Advertisement
bueddl

Untitled

Jul 28th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1.  
  2. memset(voidptr_AddressOfDetouredFunction, JMP_OPCODE, OPCODE_LENGTH) ;
  3.  
  4. Relocation = static_cast<DATATYPE_ADDRESS> ( reinterpret_cast<unsigned long> (voidptr_AddressOfDetourFunction)
  5.         - (reinterpret_cast<unsigned long> (voidptr_AddressOfDetouredFunction)
  6.         + MIN_REQUIRED_FOR_DETOUR)) ;
  7.  
  8. memcpy( reinterpret_cast<void*> (reinterpret_cast<unsigned long> (voidptr_AddressOfDetouredFunction)
  9.         + OPCODE_LENGTH), &Relocation, ADDRESS_LENGTH) ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement