Process Functions for Debugging

原文链接:http://msdn.microsoft.com/en-us/library/windows/desktop/ms680549%28v=vs.85%29.aspx

本文链接:http://blog.csdn.net/wlsgzl/article/details/18624673

The CreateProcess function enables a debugger to start a process and debug it.CreateProcess函数允许调试器开始进程并且调试。The fdwCreate parameter of CreateProcess is used to specify the type of debugging operation.CreateProcess函数的fdwCreate参数用于指定调试操作的类型。If the DEBUG_PROCESS flag is specified for the parameter, a debugger debugs the new process and all of the process's descendants, provided that the descendants are created without the DEBUG_PROCESS flag.如果参数指定了DEBUG_PROCESS,调试器调试新进程以及该进程的所有派生进程(仅当派生进程在创建时没有使用DEBUG_PROCESS标志)。

If the DEBUG_PROCESS and DEBUG_ONLY_THIS_PROCESS flags are specified for fdwCreate, a debugger debugs the new process but none of its descendants.如果fdwCreate参数指定了DEBUG_PROCESS和DEBUG_ONLY_THIS_PROCESS,调试器只调试新进程而不管它的派生进程。

One debugger can debug another by creating a process with the DEBUG_PROCESS flag. 一个调试器可以调试其他的调试器,通过创建进程时使用DEBUG_PROCESS标志。The new process (the debugger being debugged) must then create a process with the DEBUG_PROCESS flag.被调试的调试器创建进程时必须使用DEBUG_PROCESS标志。

The OpenProcess function enables a debugger to obtain the identifier of an existing process.OpenProcess函数允许一个调试器获得已经存在的进程的ID。 (The DebugActiveProcess function uses this identifier to attach the debugger to the process.) (DebugActiveProcess函数使用这个ID附加调试器到进程上。)Typically, debuggers open a process with the PROCESS_VM_READ and PROCESS_VM_WRITE flags. 通常调试器使用PROCESS_VM_READ和PROCESS_VM_WRITE标志打开进程。Using these flags enables the debugger to read from and write to the virtual memory of the process by using the ReadProcessMemory and WriteProcessMemory functions. 通过这些标志,调试器可以通过ReadProcessMemory和WriteProcessMemory函数读写进程的虚拟内存。For more information, see Processes and Threads.更多信息参见Processes and Threads。

你可能感兴趣的:(functions)