public static uint ResumeThread(SafeMemoryHandle threadHandle)
{
// Check if the handle is valid
HandleManipulator.ValidateAsArgument(threadHandle, "threadHandle");
// Resume the thread
var ret = NativeMethods.ResumeThread(threadHandle);
// If the function failed
if (ret == uint.MaxValue)
throw new Win32Exception("Couldn't resume the thread.");
return ret;
}