为什么在98下用是ok的,但到了2000下就是299的返回错误码?

解决方案 »

  1.   

    可以用,但是你的权限够吗?把自己调整到debug级别
      

  2.   

    可以用阿
    Res
    ReadProcessMemory copies the data in the specified address range from the address space of the specified process into the specified buffer of the current process. Any process that has a handle with PROCESS_VM_READ access can call the function. The process whose address space is read is typically, but not necessarily, being debugged. The entire area to be read must be accessible. If it is not, the function fails as noted previously. Requirements 
      Windows NT/2000 or later: Requires Windows NT 3.1 or later.
      Windows 95/98/Me: Requires Windows 95 or later.
      Header: Declared in Winbase.h; include Windows.h.
      Library: Use Kernel32.lib.
      

  3.   

    ProcessHndle:=OpenProcess(PROCESS_VM_OPERATION or PROCESS_QUERY_INFORMATION OR PROCESS_VM_READ,false,ProcessID)
    你看这样的权限够吗?
      

  4.   

    OpenProcess的权限用这3个参数或可以吗?PROCESS_VM_OPERATION
    PROCESS_QUERY_INFORMATION
    PROCESS_VM_READ
      

  5.   

    我用
    GetLastError 为 299Only part of a ReadProcessMemory or WriteProcessMemory request was completed. 
      

  6.   

    不是这个权限,是你要把自己进程的级别提高到debug这样才可以随意度其他进程的内容还有一个可能性,你读的部分内容,缺页了。这部分内容我也有些兴趣,但是没太多经验,仅供参考!
      

  7.   

    必须先使用DebugActiveProcess函数进入debug级别,其次还需要是以管理员身份登录系统。
      

  8.   

    执行DebugActiveProcess
    错误码为5
    Access is denied.  ERROR_ACCESS_DENIED