指定プロセスの仮想アドレス空間に確保した領域の保護属性を変更
Declare Function VirtualProtectEx Lib "kernel32.dll" _
(hProcess As Long, lpAddress As Long, dwSize As Long, _
flNewProtect As Long, lpflOldProtect As Long) As Long
Declare Function VirtualProtectEx Lib "kernel32.dll" _
(hProcess As Integer, lpAddress As Integer, dwSize As Integer, _
flNewProtect As Integer, lpflOldProtect As Integer) As Integer
BOOL VirtualProtectEx(
HANDLE hProcess,
LPVOID lpAddress,
DWORD dwSize,
DWORD flNewProtect,
PDWORD lpflOldProtect
);
引数
hProcess
アクセスするアドレス空間を所有するプロセスのハンドルlpAddress
メモリ領域のアドレスdwSize
同、サイズ(バイト数)flNewProtect
新しい保護属性(VirtualAlloc()関数を参照)lpflOldProtect
(戻り値)直前の保護属性を受けるポインタ戻り値
正常終了のとき 0以外
エラーのとき 0