现在的位置: 首页 > 综合 > 正文

GetThreadContext注意点

2014年03月17日 ⁄ 综合 ⁄ 共 387字 ⁄ 字号 评论关闭

http://msdn.microsoft.com/zh-cn/subscriptions/ms679362(v=vs.85).aspx上比较详细说明,注意两点:

1.You cannot get a valid context for a running thread. Use the SuspendThread function
to suspend the thread before calling GetThreadContext.

2.If you call GetThreadContext for the current thread, the function returns successfully; however, the context returned is not valid.

要先挂起线程,另外不能用GetThreadContext(GetCurrentThread(), &ctx)这种直接获取当前线程的代码

抱歉!评论已关闭.