Dll加载:
case LOAD_DLL_DEBUG_EVENT:
			// Read the debugging information included in the newly 
			// loaded DLL. Be sure to close the handle to the loaded DLL 
			// with CloseHandle.
//Dll加载时会进行这个事件
			dwContinueStatus = OnLoadDllDebugEvent(DebugEvent);
			break;
DWORD OnLoadDllDebugEvent(const LPDEBUG_EVENT DebugEvent)
{
//我们可以通过DebugEvent->u.LoadDll.hFile获得Dll的句柄
//但是,没有直接从HANDLE->Path的API,需要代码进行转化
//具体方法很容易查找到,这里就不介绍了。
	  GetFileNameFromHandle(DebugEvent->u.LoadDll.hFile);
		
	  return DBG_CONTINUE;
}
读取内存:
读取内存的API我们已经介绍过了ReadProcessMemory。
部分代码:
//Addr 读取的地址
//Size = sizeof(BYTE)
void *lpBuff;
lpBuff = malloc(Size);
SIZE_T bytesRead;
for (i = 0; i < 32; i++)
	{
		  if ((i % 8) == 0)      //输出4行 8列
			    printf("\n%x    ", Addr);
		  if (FALSE == ReadProcessMemory(G_Process, Addr, lpBuff, Size, &bytesRead))
		  {
			    printf("??   ");      //读取失败就输出" ??"
		  }
		  else
		  {
			    printf("%.2x ", *(BYTE*)lpBuff);
		  }
		  Addr = Addr + Size;
	}
free(lpBuff);
效果:

这章就讲这么多了。。。下一章节将详细的讲解软断点。
原文:http://www.cnblogs.com/Windogs/p/4373541.html