/// <summary> /// Uninstall the network detours. /// </summary> public void Dispose() { OnReceivePacket = null; if (SendHook.SuccessfullyInstalled) { SendHook.Uninstall(); } if (RecvHook.SuccessfullyInstalled) { RecvHook.Uninstall(); } if (SendToHook.SuccessfullyInstalled) { SendToHook.Uninstall(); } if (RecvFromHook.SuccessfullyInstalled) { RecvFromHook.Uninstall(); } if (WSASendHook.SuccessfullyInstalled) { WSASendHook.Uninstall(); } if (WSARecvHook.SuccessfullyInstalled) { WSARecvHook.Uninstall(); } }