delphi 内存操作问题
在delphi如何自定义内存地址,并读取、修改、删除它。比如,我想把内存地址为$FFFFFFFF的内容赋值为“ABC”,然后想把“ABC”改成“123”。最想不用这个数据...
在delphi 如何自定义内存地址,并读取、修改、删除它。
比如,我想把内存地址为$FFFFFFFF的内容赋值为“ABC”,然后想把“ABC”改成“123”。最想不用这个数据了,删掉它。
四个步骤都很重要,自定义内存地址,读取,修改,删除。望高手指教。
最好给实例,本人是菜鸟。 展开
比如,我想把内存地址为$FFFFFFFF的内容赋值为“ABC”,然后想把“ABC”改成“123”。最想不用这个数据了,删掉它。
四个步骤都很重要,自定义内存地址,读取,修改,删除。望高手指教。
最好给实例,本人是菜鸟。 展开
2个回答
展开全部
平时要多看msdn, 用WriteProcessMemory函数就可以了.
function WriteProcessMemory(Address: LongWord; Count: Integer; var Buffer): Integer;
Description
WriteProcessMemory writes data to an arbitrary address in the process抯 memory.
The Address parameter specifies the starting address to write.
The Count parameter specifies the number of bytes to write.
The Buffer parameter specifies the starting location of the data to write.
The return value is the number of bytes successfully written. Note that the return value is always the same as Count because if the read fails, the IDE throws an EDbkError exception.
function WriteProcessMemory(Address: LongWord; Count: Integer; var Buffer): Integer;
Description
WriteProcessMemory writes data to an arbitrary address in the process抯 memory.
The Address parameter specifies the starting address to write.
The Count parameter specifies the number of bytes to write.
The Buffer parameter specifies the starting location of the data to write.
The return value is the number of bytes successfully written. Note that the return value is always the same as Count because if the read fails, the IDE throws an EDbkError exception.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询