WriteProcessMemory的用法,高手来~~

来源:百度知道 编辑:UC知道 时间:2024/07/03 05:09:47
WriteProcessMemory有好几个参数 其中的nSize怎么设置??
比如Short型 Integer型?

nSize以字节为单位,一个字节Byte等于8位
基本数据类型的长度
ShortInt 8位 = 1Byte
SmallInt 16位 = 2Byte
Integer 16位 = 2Byte
LongInt 32位 = 4Byte
Word 16位 = 2Byte
LongWord 32位 = 4Byte
Boolean 8位 = 1Byte
WordBool 16位 = 2Byte
LongBool 32位 = 4Byte
比如要写入Integer类型的数据,那么Integer长度2Byte
所以nSize = 2