Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
'my function我的写内存函数定义
Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
'mycode
dim s as byte
'dim s as long '无论定义为byte,还是long,写入后,内存都显示为10
s=&HA
WriteProcessMemory(hProcess, myAdd, s, 1, 0&)
'why the Mem is "10",not is "0A",how i can use WriteProcessMemory Function write Mem into the &HA?

'myemail:[removed]
Posted
Updated 8-Feb-12 13:59pm
v2
Comments
Sergey Alexandrovich Kryukov 8-Feb-12 21:19pm    
You cannot ask about such an unusual and dangerous technique unless you explain why would you needed it.

Besides, what's your problem?
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900