宝峰科技

 找回密码
 注册

QQ登录

只需一步,快速开始

智能终端设备维修查询系统注册会员邮箱认证须知!
查看: 2664|回复: 2

[已解决] vb连连看生命无限辅助(单机)源码错在哪里?

[复制链接]

该用户从未签到

dapeng2010 发表于 2010-5-28 04:39:50 | 显示全部楼层 |阅读模式

欢迎您注册加入!这里有您将更精采!

您需要 登录 才可以下载或查看,没有账号?注册

x
  1. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  2. Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  3. Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  4. Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
  5. Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
  6. Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
  7. Private Const PROCESS_VM_Operation = &H8&
  8. Private Const PROCESS_VM_READ = &H10&
  9. Private Const PROCESS_VM_WRITE = &H20&


  10. Private Sub Timer1_Timer()
  11. Dim hwnd As Long
  12. Dim pId As Long
  13. Dim pHandle As Long
  14. hwnd = FindWindow(vbNullString, "连连看")
  15. GetWindowThreadProcessId hwnd, pId
  16. pHandle = OpenProcess(PROCESS_VM_Operation Or PROCESS_VM_READ Or PROCESS_VM_WRITE, 0, pId)
  17. If pHandle = 0 Then
  18. MsgBox "打开程序错误"
  19. End If
  20. WriteProcessMemory pHandle, &H12FEB8, 100, 1, 0& '生命



  21. End Sub
复制代码




以上是我学习了VB之后通过网上视频教程写的代码,程序调试没有错,前面的API声明没有错就是下面的常量声明遇到了一些问题这些常量我在API浏览器中没有找到,这是我自己加上去的,我查过资料API函数调用不当就会导致整个VB程序崩溃,管理员帮我看一下这段代码如何修改一下谢谢。
  • TA的每日心情
    开心
    2024-12-9 18:45
  • 签到天数: 124 天

    [LV.7]常住居民III

    admin 发表于 2010-5-28 13:46:02 | 显示全部楼层
    楼主怎么又换VB了?
    Dim hp as Long
    hp=100
    WriteProcessMemory pHandle, ByVal &H12FEB8, ByVal hp, 4, 0&

    该用户从未签到

     楼主| dapeng2010 发表于 2010-5-29 22:14:42 | 显示全部楼层
    我学习易语言是为了更好的学习VB,我是一名网管我很想学点编程,希望管理员多多帮我,我刚学有些问题很幼稚让各位见笑了。。。。。。。。
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    免责声明

    本站中所有被研究的素材与信息全部来源于互联网,版权争议与本站无关。本站所发布的任何软件编程开发或软件的逆向分析文章、逆向分析视频、补丁、注册机和注册信息,仅限用于学习和研究软件安全的目的。全体用户必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。学习编程开发技术或逆向分析技术是为了更好的完善软件可能存在的不安全因素,提升软件安全意识。所以您如果喜欢某程序,请购买注册正版软件,获得正版优质服务!不得将上述内容私自传播、销售或者用于商业用途!否则,一切后果请用户自负!

    QQ|Archiver|手机版|小黑屋|联系我们|宝峰科技 ( 滇公网安备 53050202000040号 | 滇ICP备09007156号-2 )

    Copyright © 2001-2023 Discuz! Team. GMT+8, 2024-12-22 21:19 , File On Powered by Discuz! X3.49

    快速回复 返回顶部 返回列表