Changeset 351 for Daodan/src/Daodan_Patch.c
- Timestamp:
- Jun 13, 2009, 3:13:36 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Daodan_Patch.c
r346 r351 1 1 #include "Daodan_Patch.h" 2 2 #include <windows.h> 3 #include <stdlib.h> 3 4 #include <string.h> 4 5 … … 102 103 return false; 103 104 } 105 106 bool DDrPatch_NOOP(char* dest, unsigned int length) 107 { 108 DWORD oldp; 109 110 if (VirtualProtect(dest, length, PAGE_EXECUTE_READWRITE, &oldp)) 111 { 112 memset(dest, 0x90, length); 113 VirtualProtect(dest, length, oldp, &oldp); 114 return true; 115 } 116 else 117 return false; 118 }
Note:
See TracChangeset
for help on using the changeset viewer.