Home > Software engineering >  Validate exceptions, used by the call to handle NtClose has NtSetInformationObject closed to prevent
Validate exceptions, used by the call to handle NtClose has NtSetInformationObject closed to prevent

Time:09-27

Say avira antivir online, but I don't have to install, and unloaded the kappa, also not line,

HANDLE currentThreadHandle=GetCurrentThread ();
HANDLE currentProcessHandle=GetCurrentProcess ();
HANDLE realThreadHandle (0);

If (0==DuplicateHandle (currentProcessHandle, currentThreadHandle currentProcessHandle, & amp; RealThreadHandle, 0, FALSE, DUPLICATE_SAME_ACCESS))
{
//If the function fails, the return value is zero
}

//...

//hung thread
SuspendThread (realThreadHandle);

//it throws an exception "used by the call to handle NtClose has NtSetInformationObject to prevent shut down,"
The CloseHandle (realThreadHandle);

CodePudding user response:

It is best to notify the thread after exit, then end of handle
  • Related