code2012

加油,坚持,努力,自信
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年3月13日

摘要: From http://hi.baidu.com/raulsyp/blog/item/8fa5e1f98f3d2c1b09244d88.htmlFS寄存器获得kernel32.dll地址2010-08-18 21:16FS寄存器指向当前活动线程的TEB结构(线程结构)偏移 说明000 指向SEH链指针004 线程堆栈顶部008 线程堆栈底部00C SubSystemTib010 FiberData014 ArbitraryUserPointer018 TEB地址020 进程PID024 线程ID02C 指向线程局部存储指针030 PEB结构地址(进程结构)034 上个错误号注意:1.fs:18 阅读全文

posted @ 2012-03-13 22:39 code2012 阅读(1447) 评论(0) 推荐(0) 编辑

摘要: From http://www.cnblogs.com/feiyucq/archive/2010/05/10/1732077.htmlA Crash Course on the Depths of Win32 Structured Exception HandlingMatt Pietrek 著 董岩 译原文:http://www.microsoft.com/msj/0197/exception/exception.aspx 在Win32操作系统提供的所有功能中,使用最广泛而又没有公开的恐怕要数结构化异常处理(Structured Exception Handling,SEH)了。当你考虑Wi 阅读全文

posted @ 2012-03-13 22:38 code2012 阅读(309) 评论(0) 推荐(0) 编辑

摘要: FS寄存器到_TEB线程环境块From http://www.cppblog.com/Alexxu/archive/2010/01/20/106066.aspx从FS寄存器获取当前线程IDint GetThreadId(){int ithread = 0;_asm{ xor esi , esi mov eax, fs:[esi+18h] mov ecx, [eax+ 20h] mov eax, [eax+ 24h] mov dword ptr[ithread], eax}return ithread;}从FS寄存器获取当前进程IDint GetProcessId(){int iProcess. 阅读全文

posted @ 2012-03-13 22:37 code2012 阅读(1943) 评论(0) 推荐(0) 编辑