2008-6-10 15:52 阿尔法孝直
vb问题(3)

请看下面一段程序:

(声明API函数部分省略。。。)
Private Sub Command1_Click()
Dim i As Byte , Data As Byte , MyStr As String*1
For i=0 To 255
Data=i
WriteProcessMemory MyProcess, Address, Data, 1, 0&
ReadProcessMemory MyProcess, Address, MyStr, 1, 0&
Data=Asc(MyStr)
Debug.Print Data
Next i
End Sub

问题是,程序运行后,显示如下结果:
[quote]0
1
2
3
4
5
中间省略……
124
125
126
127
0
0
0
中间省略……
0
0
0
[/quote]
现在我希望0~255的数据都能从内存读出来,如下:
[quote]1
2
3
4
5
中间省略……
251
252
253
254
255
[/quote]

问应该如何修改程序???

2008-6-10 16:20 土狼
不能肯定问题出在哪,感觉是读写过程中出了错

个人建议楼主不要用byte这种类型,大大方方的用integer,不在乎那点内存吧:titter:

2008-6-10 16:23 阿尔法孝直
没用,这个是ASCII编码问题,用Integer就更不行了。

2008-6-10 17:13 司徒苍月
ASCII编码7+1位校验,所以只能是2的7次方:sleep:

2008-6-10 18:09 Maxwell
机器上没有VB,晚上回去没有网络,明天再看。。。

2008-6-11 10:40 Maxwell
:(昨天没时间试,简单猜测一下吧。
[code]Private Sub Command1_Click()
    Dim i As Byte , Data As Byte , MyStr As String*1

    For i=0 To 255
        Data=i
        WriteProcessMemory MyProcess, Address, Data, 1, 0&
        ReadProcessMemory MyProcess, Address, MyStr, 1, 0&
        Data=Asc(MyStr)
        Debug.Print Data
    Next i
End Sub[/code]

首先i不应该定义为byte类型,不然循环会溢出。
MyStr应该是个引用,所以把MyStr的地址传给ReadProcessMemory恐怕会有问题,不过你前127个倒是显示出来了,估计还是跟String内部实现机制有关,String内部可能是unicode存储的,对高于127的字符需要特别处理,这个仅是猜测,但是MSDN中对String的描述中有一条就是不要用于任何跟数值有关的地方。你用另外一个byte类型的变量传给ReadProcessMemory不行吗?

2008-6-11 10:41 Maxwell
[quote]原帖由 [i]司徒苍月[/i] 于 2008-6-10 17:13 发表
ASCII编码7+1位校验,所以只能是2的7次方:sleep: [/quote]
:funk:

2008-6-11 14:30 阿尔法孝直
现在问题是怎么解决,我要搞一个内存修改器

2008-6-11 14:48 fantasydog
不了解VB。
不过Byte是unsigned char么?
Asc这个函数返回值又是啥?unsigned char?

有符号的东西其实蛮讨厌的,移位都移不动

2008-6-11 14:58 Maxwell
[quote]原帖由 [i]阿尔法孝直[/i] 于 2008-6-11 14:30 发表
现在问题是怎么解决,我要搞一个内存修改器 [/quote]

你用另外一个byte类型的变量传给ReadProcessMemory不行吗?

二进制这事儿VB确实不太擅长,有这功夫都可以学学其他语言了,当然仅供参考,当前还是先解决问题为主。:lol:

2008-6-11 14:59 Maxwell
[quote]原帖由 [i]fantasydog[/i] 于 2008-6-11 14:48 发表
不了解VB。
不过Byte是unsigned char么?
Asc这个函数返回值又是啥?unsigned char?

有符号的东西其实蛮讨厌的,移位都移不动 [/quote]

移位移不动是不是因为是const类型的?

2008-6-11 15:34 阿尔法孝直
[quote]原帖由 [i]Maxwell[/i] 于 2008-6-11 14:58 发表


你用另外一个byte类型的变量传给ReadProcessMemory不行吗?

二进制这事儿VB确实不太擅长,有这功夫都可以学学其他语言了,当然仅供参考,当前还是先解决问题为主。:lol: [/quote]

不行,好早就试过,会出错。

2008-6-11 16:14 Maxwell
[quote]原帖由 [i]阿尔法孝直[/i] 于 2008-6-11 15:34 发表


不行,好早就试过,会出错。 [/quote]

查了一下第3个参数是ByVal lpBuffer As Any,这是byte不行的原因,另外string是用BSTR实现的,所以对于大于127的值可能有特别处理。
你贴一个能运行的代码吧,现在想了几个方案,不知道哪个能用,回头我试试。

2008-6-13 16:55 龙王
这里要用字符串数组,byte变量不行的,用VC++吧,用1个char 数组,然后CString

2008-6-13 18:22 阿尔法孝直
Sorry,VC++我不熟。

2008-6-14 01:29 Maxwell
我是说你先贴一段能运行但是结果不正确的代码,然后我好试试怎么能用,不要让我自己补全代码了。

2008-6-17 13:57 fantasydog
回复 #11 Maxwell 的帖子

不是,编译器直接报错。
就是不能移signed类型的,毕竟有个符号位在那里,处理起来相当麻烦。
我估计是编译器图省事,直接不准移位有符号数了。
再者,有符号数的移位通常意义也不大。乘除2的幂次的情况本来就少,也提高不了多少性能。

2008-6-17 14:34 Maxwell
晕,什么语言?c#?从来没觉得c/c++中有不能移位的,就连浮点型真想移都能移了。到了机器码那一级,有没有符号位处理上都基本一样。

2008-6-20 15:51 阿尔法孝直
代码贴上来,大家看看。
顺便帮忙解决一下数据写不进内存的问题。

[[i] 本帖最后由 阿尔法孝直 于 2008-6-20 15:55 编辑 [/i]]

2008-6-20 16:39 Maxwell
晕,到底是写不进去还是读不出来?哪个文件的哪个函数哪一行有问题,这样说明一下是不是更利于找问题?

2008-6-20 16:55 阿尔法孝直
第一个问题:

写内存的程序段:
  [color=blue]Private[/color] [color=blue]Sub[/color] Command3_Click()
[color=red]   WriteProcessMemory nHandle, nAddress, [color=blue]CLng[/color](Text2.Text), nByte, 0&
[/color]  [color=blue]End Sub[/color]
就红色这句,改个数执行之后再按“读取”,又变成原来的数。


第二个问题:

读内存的程序段:
  [color=blue]Private Sub[/color] Command1_Click()
[color=blue]    On Error Resume Next[/color]
    [color=blue]Dim[/color] nStr [color=blue]As String[/color] * 1
    [color=blue]Dim[/color] Result [color=blue]As Long
[/color]    [color=blue]Dim[/color] i [color=blue]As Byte
    For[/color] i = 0 [color=blue]To[/color] nByte - 1
[color=red]     ReadProcessMemory nHandle, nAddress + i, nStr, 1, 0&
     Result = Result + Asc(nStr) * 256 ^ i
[/color]    [color=blue]Next[/color] i
    Text2.Text = Trim(Str(Result))
  [color=blue]End Sub[/color]
[color=black]就红色的这两句,第一句执行时,凡是任何单字节在128~255之间的数据,读出来都是0,即[/color]
[color=#000000]  [/color][color=red]Asc(nStr)=0[/color]

2008-6-20 17:04 Maxwell
知道了,周末有事,下周来看看。

2008-6-23 17:46 阿尔法孝直
第一个问题自己改了代码后,解决了。


现在剩下第二个问题:

读内存的程序段:
  [color=blue]Private Sub[/color] Command1_Click()
[color=blue]    On Error Resume Next[/color]
    [color=blue]Dim[/color] nStr [color=blue]As String[/color] * 1
    [color=blue]Dim[/color] Result [color=blue]As Long
[/color]    [color=blue]Dim[/color] i [color=blue]As Byte
    For[/color] i = 0 [color=blue]To[/color] nByte - 1
[color=red]     ReadProcessMemory nHandle, nAddress + i, nStr, 1, 0&
     Result = Result + Asc(nStr) * 256 ^ i
[/color]    [color=blue]Next[/color] i
    Text2.Text = Trim(Str(Result))
  [color=blue]End Sub[/color]
[color=black]就红色的这两句,第一句执行时,凡是任何单字节在128~255之间的数据,读出来都是0,即[/color]
[color=#000000]  [/color][color=red]Asc(nStr)=0[/color]

2008-6-24 10:52 Maxwell
想必楼主找到了一个可以写入的地址,不过我没有找到,我选择内存读写器,随机设置了几个地址写入都不成功。

2008-6-24 11:20 阿尔法孝直
随便打开一个游戏,比如曹操传,找到曹操的HP地址,看看行不行

2008-6-24 14:28 Maxwell
好容易想了个办法测试了一下代码,有两种方法能够正确执行,有一种多少有点hack,说一下另一种吧,用下面的代码可以实现原来想要的功能,其实这里面还是利用了x86特性将byte, word, dword用一行代码处理了。VarPtr是一个内置函数,用于取变量的地址,相当于c/c++中的单目运算符&。
Private Sub Command1_Click()
    On Error Resume Next

    Dim data As Long

    ReadProcessMemory nHandle, nAddress, VarPtr(data), nByte, 0&

    Text2.Text = Trim$(Str$(data))
End Sub

你说写已经没问题那我就不测了,我怕写进去我的程序崩掉,参考这个代码相信也能用一行解决问题。

2008-6-24 16:42 阿尔法孝直
没用,还是一样。
不过前面的情况有错,应该是:

128~[color=red]254[/color]还是0,
0~127或[color=red]255[/color]正常读出。

[[i] 本帖最后由 阿尔法孝直 于 2008-6-24 16:51 编辑 [/i]]

2008-6-24 16:54 Maxwell
你在什么环境下测试的?如果255能读出来不可能128-254读不了:funk:
我测试的时候是读取自身进程的连续16个字节,其中有90,3,255,177,240。

2008-6-24 17:18 阿尔法孝直
[quote]原帖由 [i]Maxwell[/i] 于 2008-6-24 16:54 发表
你在什么环境下测试的?如果255能读出来不可能128-254读不了:funk:
我测试的时候是读取自身进程的连续16个字节,其中有90,3,255,177,240。 [/quote]


在XP SP2下用VB6按F5直接运行程序

我写一个字节再读出来

确实不行

不过情况又有变化:变成0~[color=red]128[/color]或255能读,[color=red]129[/color]~254不能读

2008-6-24 17:24 Maxwell
你写的字节有没有写进去是个问题,所以我直接找一段地址挨着读,我后来试了一下,对于我测试的地址用你的代码写不进去。

2008-6-24 17:53 阿尔法孝直
金山游侠V检验的结果:
129~254能写进去,不过用金山游侠V读出来是0
内存数据是129~254,读出来是0
0~128或255读写都正常。

2008-6-24 17:59 Maxwell
金山游侠读出来是0怎么知道是写进去了?我觉得用string有它天然的缺陷,内部是BSTR,当byte用很难说会出什么问题。

2008-6-24 18:02 阿尔法孝直
[quote]原帖由 [i]Maxwell[/i] 于 2008-6-24 17:59 发表
金山游侠读出来是0怎么知道是写进去了? [/quote]

执行后,数据由非0变为0,说明写进去了。

2008-6-24 18:12 Maxwell
你是说写进去之后在被写的程序里数值变了,而金山游侠读出来的也是0?那是不是因为程序又重新刷回了0,找个别的程序写写试试。

2008-6-24 18:22 阿尔法孝直
不会。因为我用0~128或255时没出现这种问题,且换了其他程序也是一样。

2008-6-24 20:00 Maxwell
那你读一段现有非0数据,看看有没有落在这个范围内的,根据推测,问题不在代码上。

2008-6-24 21:43 阿尔法孝直
我试过,在0~128或255完全正常,没有任何问题

2008-6-24 21:59 Maxwell
既然试过没有问题那就不是读取代码的问题了,读取代码从机制上没有特殊处理过。建议找个记事本读读数据试试,游戏里面的不确定性比较多。

2008-6-24 22:29 阿尔法孝直
记事本MS是只读进程,写进去什么,读出来都是原来的值。
不过可完全访问的进程都是0~128或255读写正常。

2008-6-25 08:30 Maxwell
我的意思是从记事本里读连续100个位置,看看有没有在129-254之间的数字。或者读内存读写器试试,0x00400001-0x00400010之间有几个数。

2008-6-25 10:40 阿尔法孝直
[size=3]这是我用金山游侠读取“记事本”进程十六进制[font=Times New Roman][color=#000000]0x1000040~0x100008F(十进制16777280~16777359)连续80个字节的结果([color=blue][b]十六进制[/b][/color])[/color][/font][/size]
[font=Times New Roman][size=3][color=red]红色为0x81~0xFE(十进制129~254)[/color][/size][/font]
[size=3][/size]
[table][tr][td=1,1,35][color=#000000][font=Times New Roman][size=3]0E[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]1F[/size][/font][/color]
[/td][td=1,1,35][color=red][font=Times New Roman][size=3]BA[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]0E[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]00[/size][/font][/color]
[/td][td=1,1,35][color=red][font=Times New Roman][size=3]B4[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]09[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]CD[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]21[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]B8[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]01[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]4C[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]CD[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]21[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]54[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]68[/size][/font][/color]
[/td][/tr][tr][td=1,1,35][color=#000000][font=Times New Roman][size=3]69[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]73[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]20[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]70[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]72[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]6F[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]67[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]72[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]61[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]6D[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]20[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]63[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]61[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]6E[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]6E[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]6F[/size][/font][/color]
[/td][/tr][tr][td=1,1,35][color=#000000][font=Times New Roman][size=3]74[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]20[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]62[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]65[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]20[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]72[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]75[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]6E[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]20[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]69[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]6E[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]20[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]44[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]4F[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]53[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]20[/size][/font][/color]
[/td][/tr][tr][td=1,1,35][color=#000000][font=Times New Roman][size=3]6D[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]6F[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]64[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]65[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]2E[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]0D[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]0D[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]0A[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]24[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]00[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]00[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]00[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]00[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]00[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]00[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]00[/size][/font][/color]
[/td][/tr][tr][td=1,1,35][color=red][font=Times New Roman][size=3]EC[/size][/font][/color]
[/td][td=1,1,35][color=red][font=Times New Roman][size=3]85[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]5B[/size][/font][/color]
[/td][td=1,1,35][color=red][font=Times New Roman][size=3]A1[/size][/font][/color]
[/td][td=1,1,35][color=red][font=Times New Roman][size=3]A8[/size][/font][/color]
[/td][td=1,1,35][color=red][font=Times New Roman][size=3]E4[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]35[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]F2[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]A8[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]E4[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]35[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]F2[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]A8[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]E4[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]35[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]F2[/size][/font][/color]
[/td][/tr][/table][size=3][/size]
[size=3]这是我用内存读写器读取“记事本”进程[color=#000000][font=Times New Roman]十进制16777280~16777359(十六进制0x1000040~0x100008F)连续80个字节的结果([b][color=blue]十进制[/color][/b])[/font][/color][/size]
[table][tr][td=1,1,35][color=#000000][font=Times New Roman][size=3]14[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]31[/size][/font][/color]
[/td][td=1,1,35][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]14[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,35][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]9[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]33[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]1[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]76[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]33[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]84[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]104[/size][/font][/color]
[/td][/tr][tr][td=1,1,35][color=#000000][font=Times New Roman][size=3]105[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]115[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]32[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]112[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]114[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]111[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]103[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]114[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]97[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]109[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]32[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]99[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]97[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]110[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]110[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]111[/size][/font][/color]
[/td][/tr][tr][td=1,1,35][color=#000000][font=Times New Roman][size=3]116[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]32[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]98[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]101[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]32[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]114[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]117[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]110[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]32[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]105[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]110[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]32[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]68[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]79[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]83[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]32[/size][/font][/color]
[/td][/tr][tr][td=1,1,35][color=#000000][font=Times New Roman][size=3]109[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]111[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]100[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]101[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]46[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]13[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]13[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]10[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]36[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][/tr][tr][td=1,1,35][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,35][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,35][color=#000000][font=Times New Roman][size=3]91[/size][/font][/color]
[/td][td=1,1,35][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,35][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,35][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]53[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]53[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][td=1,1,36][color=#000000][font=Times New Roman][size=3]53[/size][/font][/color]
[/td][td=1,1,36][color=red][font=Times New Roman][size=3]0[/size][/font][/color]
[/td][/tr][/table]

2008-6-25 11:54 Maxwell
我测试了前3个红字的值,都与你提供的金山游侠的值相同。
我的系统win2003serversp2 vb6sp6,使用下面的读取代码
Private Sub Command1_Click()
    On Error Resume Next

    Dim data As Long

    ReadProcessMemory nHandle, nAddress, VarPtr(data), nByte, 0&

    Text2.Text = Trim$(Str$(data))
End Sub

页: [1]
查看完整版本: vb问题(3)


Powered by Discuz! Archiver 5.0.0  © 2001-2006 Comsenz Inc.