Public paste
Undefined
By: adasdcode | Date: Jan 7 2008 20:47 | Format: None | Expires: never | Size: 1.83 KB | Hits: 1177

  1. Dim f1holder As Integer
  2. Dim timer_pos As Long
  3.  
  4. 'API Declaration
  5. Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
  6. Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
  7. Private 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
  8. Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
  9. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
  10. Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
  11. Private Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  12.  
  13.  
  14. Public Function ReadAByte(gamewindowtext As String, address As Long, valbuffer As Byte)
  15. Dim hwnd As Long
  16. Dim pid As Long
  17. Dim phandle As Long
  18. hwnd = FindWindow(vbNullString, gamewindowtext)
  19. If (hwnd = 0) Then
  20. MsgBox "Sorry, couldn't fin", vbCritical, "Error"
  21. End
  22. Exit Function
  23. End If
  24. GetWindowThreadProcessId hwnd, pid
  25. phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
  26. If (phandle = 0) Then
  27.  
  28. Exit Function
  29. End If
  30. ReadProcessMem phandle, address, valbuffer, 1, 0&
  31. CloseHandle hProcess
  32. End Function
  33.  
  34. Private Sub Command1_Click()
  35. Me.Label1.Refresh
  36. End Sub
  37.  
  38. Private Sub Form_Load()
  39.  
  40. Dim value As Byte
  41. Call ReadAByte("SRO_Client", &11B9A224, value) '&H15200F94 is only a Exsampel you must 'selfe find the code;)
  42. Me.Label1.Caption = "Your Skillpoints: " & value
  43. End Sub