/// <summary> /// Stops remote control of the session. The session must be running on the local server. /// </summary> public void StopRemoteControl() { if (!this.IsLocal) { throw new InvalidOperationException( "Cannot stop remote control on sessions that are running on remote servers"); } if (IsVistaSp1OrHigher) { NativeMethodsHelper.StopRemoteControl(this._sessionId); } else { NativeMethodsHelper.LegacyStopRemoteControl(this._server.Handle, this._sessionId, true); } }