??Windows????????С???ó????е????????
???????????? ???????[ 2013/1/8 15:51:37 ] ????????
????????????????洢???????????
????????????????????????洢???????????????е?????????????????VirtualFree??????
BOOL VirtualFree(
LPVOID pvAddress??
SIZE_T dwSize??
DWORD fdwFreeType);
????pvAddress???????????????????????????????????VirtualAlloc?????????????????????????????????????С???????????????????0??dwSize??
??????????MEM_RELEASE??fdwFreeType???????????????????????????????????洢??????????????
????????????????????????????????????洢??????????????pvAddress??????????????????????????????????????dwSize????????????????????????洢????С????????MEM_DECOMMIT??fdwFreeType??
?????????????洢???????????????????????????????????????????????λ?????????У????????????????????檔???dwSize?0????pvAddress???????????????????VirtualFree????????????????????檔
?????????????
???????????????????????????????洢???????????????磬???????д??????????????????????е??????????????????????С??????????????????????????????????????????????????????洢?????????????PAGE_READWRITE???????????????????FPAGE_NOACCESS?????????????????????????????????????????
??????????????VirtualProtect???????????????????????????
BOOL VirtualProtect(
PVOID pvAddress??
SIZE_T dwSize??
DWORD flNewProtect??
PDWORD pflOldProtect);
????pvAddress????????????
????dwSize???????????????С??????????λ??
????flNewProtect?????????PAGE_WRITECOPY??PAGE_EXECUTE_WRITECOPY?????κ?PAGE_*?????
????pflOldProtect??????????????????????????????????NULL?????????????Ч??????VirtualProtect???????????????
???????????????????????????洢?????????VirtualProtect????pvAddress??dwSize???????????????????????????????????????????????????????
????????????洢????????
???????????????????????????????????????????С?????ó???????????????????????????????棬??????????в?????????檔????????????棬?????????????檔???????????????????????????????Щ??檔?????????????????????????Щ??????????????????
????Windows???????????????ó????????????????????????????????????洢????????????洢?????????????????????????洢???????????б???????????????????????????????????????????????????д??????????????Щ??ó?????????С??????????洢??????????????洢???е???????????????????ó??????????????????б?????????????????????б???洢???
???????????洢??????ó?????????VirtualAlloc?????????????????д?MEM_RESET?????
PINT pnData=(PINT)VirtualAlloc(NULL??1024??
MEM_RELEASE|MEM_COMMIT??PAGE_READWRITE);
pnData[0]=100;
pnData[1]=200;
VirtualAlloc((PVOID)pnData??sizeof(int)??MEM_RESET??PAGE_READWRITE);
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11