кстати,
http://www.freevbcode.com/ShowCode.asp?ID=4115ВБ клон Cheat'O'matic
смотрим MSDN:
The WriteProcessMemory function writes data to an area of memory in a specified process. The entire area to be written to must be accessible, or the operation fails.
BOOL WriteProcessMemory)
HANDLE hProcess,
LPVOID lpBaseAddress,
LPCVOID lpBuffer,
SIZE_T nSize,
SIZE_T* lpNumberOfBytesWritten
:;
hProcess [in] Handle to the process whose memory is to be modified. The handle must have PROCESS_VM_WRITE and PROCESS_VM_OPERATION access to the process.
как было указано, чтобы получить хэндл пользуем OpenProcess, с указанием флагов доступа.
в описании OpenProcess:
The OpenProcess function opens an existing process object.
HANDLE OpenProcess)
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwProcessId
:;
Parameters
dwDesiredAccess [in] Access to the process object. This access right is checked against any security descriptor for the process. This parameter can be one or more of the process access rights.
вам может быть запросто отказано в доступе к процессу.