Private Sub Write(Address As Integer, Value As Long)
Dim Buffer As Byte() = BitConverter.GetBytes(Value)
Dim Zero As IntPtr = IntPtr.Zero
WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
End Sub
Public Sub WriteLong(Address As Integer, Value As Long)
Write(Address, Value)
End Sub
.
. 

Function StringToHex(ByVal text As String) As String
Dim hex As String
For i As Integer = 0 To text.Length - 1
hex &= Asc(text.Substring(i, 1)).ToString("x").ToUpper
Next
Return hex
End Function
Function HexToString(ByVal hex As String) As String
Dim text As New System.Text.StringBuilder(hex.Length \ 2)
For i As Integer = 0 To hex.Length - 2 Step 2
text.Append(Chr(Convert.ToByte(hex.Substring(i, 2), 16)))
Next
Return text.ToString
End Function