/// <summary> /// Registers a port which will be notified when the current thread terminates. /// </summary> /// <param name="portHandle">A handle to a port.</param> public static void RegisterTerminationPort(PortHandle portHandle) { NtStatus status; if ((status = Win32.NtRegisterThreadTerminatePort(portHandle)) >= NtStatus.Error) { Win32.Throw(status); } }
/// <summary> /// Registers a port which will be notified when the current thread terminates. /// </summary> /// <param name="portHandle">A handle to a port.</param> public static void RegisterTerminationPort(PortHandle portHandle) { Win32.NtRegisterThreadTerminatePort(portHandle).ThrowIf(); }