bl双性强迫侵犯h_国产在线观看人成激情视频_蜜芽188_被诱拐的少孩全彩啪啪漫画

vb.netReadProcessMemory使用方法-創新互聯

網上好多關于ReadprocessMemory、WriteprocessMemory使用方法的貼子都不能用,下面是本人親自測過可用的,望對大家有用。

創新互聯專注于高唐網站建設服務及定制,我們擁有豐富的企業做網站經驗。 熱誠為您提供高唐營銷型網站建設,高唐網站制作、高唐網頁設計、高唐網站官網定制、小程序設計服務,打造高唐網絡公司原創品牌,更為您提供高唐網站排名全網營銷落地服務。

   ''' <summary>
    ''' 讀取內存地址
    ''' </summary>
    ''' <param name="hProcess">進程句柄</param>
    ''' <param name="lpBaseAddress">內存地址</param>
    ''' <param name="lpBuffer">數據存儲變量</param>
    ''' <param name="nSize">長度sizeof(lpBuffer)</param>
    ''' <param name="lpNumberOfBytesRead">讀取長度</param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Declare Function ReadProcessMemory Lib "kernel32.dll" (ByVal hProcess As Integer, ByVal lpBaseAddress As IntPtr, ByVal lpBuffer As IntPtr, ByVal nSize As Integer, ByRef lpNumberOfBytesRead As Integer) As Boolean

   ''' <summary>
    ''' 寫入內存地址
    ''' </summary>
    ''' <param name="hProcess">進程句柄</param>
    ''' <param name="lpBaseAddress">寫入進程的內存地址</param>
    ''' <param name="lpBuffer">數據存儲變量</param>
    ''' <param name="nSize">長度sizeof(lpBuffer)</param>
    ''' <param name="lpNumberOfBytesWritten">實際數據的長度</param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Declare Function WriteProcessMemory Lib "kernel32" Alias "WriteProcessMemory" _
        (ByVal hProcess As Integer, ByVal lpBaseAddress As IntPtr, _
         ByVal lpBuffer As Byte(), ByVal nSize As Integer, ByVal lpNumberOfBytesWritten As IntPtr) As Boolean

Declare Function OpenProcess Lib "kernel32.dll" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer

   Friend Const PROCESS_ALL_ACCESS = &H1F0FFF = 2035711
    Friend Const PROCESS_VM_READ = &H10
    Friend Const PROCESS_VM_WRITE = &H20

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim hw As Integer = OpenProcess(PROCESS_VM_READ, False, 4304)
        Dim getstr(12) As Byte
        Dim GetStrIntptr = Marshal.UnsafeAddrOfPinnedArrayElement(getstr, 0)
        Button1.Text = "read結果:" & ReadProcessMemory(hw, CType(&H4D45A0, IntPtr), GetStrIntptr, 12, 0)
        TextBox1.Text = Marshal.PtrToStringUni(GetStrIntptr)
        TextBox3.Text = "GLE:" & GetLastError
        CloseHandle(hw)
    End Sub
‘需要注意:readprocessmemory的lpBuffer放的地數組地址的基址,需要用marshal轉化一下。Marshal.PtrToStringUni(GetStrIntptr)輸出內容。

   Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim hw As Integer = OpenProcess(&H1F0FFF, False, 4304)
        Dim Wrtstr(12) As Byte
        Wrtstr = System.Text.Encoding.Unicode.GetBytes("vbWrit")
        Button2.Text = "Write結果:" & WriteProcessMemory(hw, CType(&H4D45A0, IntPtr), Wrtstr, 12, 0)
        TextBox3.Text = "GLE:" & GetLastError
        CloseHandle(hw)
    End Sub

創新互聯www.cdcxhl.cn,專業提供香港、美國云服務器,動態BGP最優骨干路由自動選擇,持續穩定高效的網絡助力業務部署。公司持有工信部辦法的idc、isp許可證, 機房獨有T級流量清洗系統配攻擊溯源,準確進行流量調度,確保服務器高可用性。佳節活動現已開啟,新人活動云服務器買多久送多久。

當前文章:vb.netReadProcessMemory使用方法-創新互聯
文章地址:http://vcdvsql.cn/article42/dsddhc.html

成都網站建設公司_創新互聯,為您提供電子商務、品牌網站建設、網站策劃、微信公眾號、云服務器企業建站

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

營銷型網站建設