CreateProcess("something.exe", NULL, NULL, NULL, FALSE, CREATE_SUSPENDED,
NULL, NULL, &sInfo, &pInfo);
ReadProcessMemory(pInfo.hProcess, (LPCVOID) (contx.Ebx + 8),
(LPVOID) &baseAddress, sizeof(baseAddress), NULL);
hProcess=OpenProcess(PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_VM_OPERATION,
FALSE, pInfo.dwProcessId);
VirtualProtectEx(hProcess, (LPVOID) baseAddress, sizeof(IMAGE_DOS_HEADER),
PAGE_EXECUTE_READWRITE, NULL);
WriteProcessMemory(hProcess, (LPVOID) baseAddress, (LPCVOID) pidh,
sizeof(IMAGE_DOS_HEADER), NULL);
VirtualProctecExでERROR_NOACCESSが表示されるのはなぜですか?