How to change the ACCESS_MASK of a thread?
Bruno Jesus
00cpxxx at gmail.com
Mon Nov 9 16:30:28 CST 2015
Hi all. I have a simple question that I could not find an answer after
looking for a lot. All I need is to remove the THREAD_SUSPEND_RESUME
flag from the ACCESS_MASK to add it again later.
info.GrantedAccess = 0;
NtQueryObject(GetCurrentThread(), ObjectBasicInformation,
&info, sizeof(info), NULL);
if (info.GrantedAccess & THREAD_SUSPEND_RESUME)
{
changed = TRUE;
info.GrantedAccess &= ~THREAD_SUSPEND_RESUME;
//magic here
}
This is about fixing bug 3930 where SuspendThread is called from
inside a callback deadlocking the game. If I can prevent the
SuspendThread from running it will work.
Best wishes,
Bruno
More information about the wine-devel
mailing list