本帖最后由 davidmfs 于 2010-07-27 15:48:24 编辑

解决方案 »

  1.   

    既然都已经能读出为Byte()了,再如何处理是后面的事了,干嘛要在驱动里折腾呢?
      

  2.   

    可是我要想直接读出Text这个种类
    Public Function ReadProcessMemoryString(ByVal hProcess As Long, _
                                        ByVal lpBaseAddress As Long, _
                                        ByRef lpData As String, _
                                        nSize As Long) As Boolean
        ReadProcessMemoryString = False
        If m_DriverLoader.isInvalide = False Then Exit Function
        If hProcess <= 0 Then Exit Function
        Dim ctlCode As Long, ret As Long, tmp() As Byte, tmpAddr As Long
        Dim udtInput As MEMINFO
        
        udtInput.hProcess = hProcess
        udtInput.inputAddr = lpData
        udtInput.lpBaseAddress = lpBaseAddress
        udtInput.nSize = nSize
        
        ctlCode = m_DriverLoader.CTL_CODE(FILE_DEVICE_UNKNOWN, &H804, METHOD_BUFFERED, FILE_ANY_ACCESS)
        ret = m_DriverLoader.IoControl(ctlCode, VarPtr(udtInput), LenB(udtInput), 0, 4)    '--------------------------------------------------------------------------------------------------------
       
        If ret > 0 Then
            ReadProcessMemoryString = True
        End If
    End Function