求教异常“由句柄所调用的 NtClose 已使用 NtSetInformationObject 以防止关闭”
网上说是小红伞,但我没有安装。另外把卡巴卸了,也不行。
HANDLE currentThreadHandle = GetCurrentThread();
HANDLE currentProcessHandle = GetCurrentProcess();
HANDLE realThreadHandle(0);
if( 0 == DuplicateHandle(currentProcessHandle, currentThreadHandle, currentProcessHandle, &realThreadHandle, 0, FALSE, DUPLICATE_SAME_ACCESS) )
{
// If the function fails, the return value is zero
}
// ...
// 挂起线程
SuspendThread(realThreadHandle);
// 该行抛出异常“由句柄所调用的 NtClose 已使用 NtSetInformationObject 以防止关闭。”
CloseHandle(realThreadHandle);