 |
|
ช่วยดูโค้ด VB.NET ให้หน่อยสิครับ งง มากเลย VB.NET 2010 |
|
 |
|
|
 |
 |
|
มัน เกิดข้อผิดพลาดตรง เลข 0 ทั้ง 2บรรทัดเลย ช่วยที VB2010
ReadProcessMemory(hProcess(0).Handle, address, currentscore, 4, 0)
WriteProcessMemory(hProcess(0).Handle, address, value, 4, 0)
Code (VB.NET)
Public Class Form1
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim name As String = "zuma"
Dim hProcess As Process() = Process.GetProcessesByName(name)
Dim address As Integer = &H35480C0
Dim currentscore As Integer
ReadProcessMemory(hProcess(0).Handle, address, currentscore, 4, 0)
Label1.Text = currentscore
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim name As String = "zuma"
Dim hProcess As Process() = Process.GetProcessesByName(name)
Dim address As Integer = &H35480C0
Dim value As Integer = 10009999
WriteProcessMemory(hProcess(0).Handle, address, value, 4, 0)
End Sub
End Class
Tag : .NET, Win (Windows App), VB.NET
|
ประวัติการแก้ไข 2011-07-04 22:34:37 2011-07-04 22:35:09 2011-07-05 12:58:52
|
 |
 |
 |
 |
Date :
2011-07-04 22:33:27 |
By :
naya2007 |
View :
2103 |
Reply :
3 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Null แทน 0 จะช่วยอะไรได้ไหมครับ
|
 |
 |
 |
 |
Date :
2011-07-05 10:44:20 |
By :
kaimuk |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองเปลี่ยนจาก
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) เป็น
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Long, ByVal nSize As Integer, ByRef BytesWritten As Integer) As Integer
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Long, ByVal nSize As Integer, ByRef BytesWritten As Integer) As Integer
|
 |
 |
 |
 |
Date :
2011-10-28 19:39:09 |
By :
B |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (C#)
10.customer_edit_profile2 =
Code = <?
include"config_connect.php";
if ($_POST["c_password"] == "") {
?>
<?
}
$id = $_POST["id"];
$c_password = $_POST["c_password"];
$c_name = $_POST["c_name"];
$c_surname = $_POST["c_surname"];
$c_tel = $_POST["c_tel"];
$c_sex = $_POST["c_sex"];
$c_address = $_POST["c_address"];
$c_email = $_POST["c_email"];
$c_fax = $_POST["c_fax"];
$c_company = $_POST["c_company"];
$c_job = $_POST["c_job"];
$sql = "UPDATE customer SET c_name = '$c_name',
c_surname = '$c_surname',
c_sex = '$c_sex',
c_address = '$c_address',
c_job = '$c_job',
c_company = '$c_company',
c_tel = '$c_tel',
c_email = '$c_email',
c_password = '$c_password' WHERE customer.c_id = $id";
$db_query = mysql_query($sql, $connect);
if ($db_query) {
echo "แก้ไขข้อมูลส่วนตัวเรียบร้อย";
} else {
echo "ไม่สามารถแก้ไขข้อมูลส่วนตัวได้";
}
?>
|
 |
 |
 |
 |
Date :
2012-03-15 16:30:52 |
By :
hon |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|