diff --git a/ffi/dotnet/Devolutions.IronRdp.AvaloniaExample/Devolutions.IronRdp.AvaloniaExample.csproj b/ffi/dotnet/Devolutions.IronRdp.AvaloniaExample/Devolutions.IronRdp.AvaloniaExample.csproj
index 5d0e34f1..e29164c4 100644
--- a/ffi/dotnet/Devolutions.IronRdp.AvaloniaExample/Devolutions.IronRdp.AvaloniaExample.csproj
+++ b/ffi/dotnet/Devolutions.IronRdp.AvaloniaExample/Devolutions.IronRdp.AvaloniaExample.csproj
@@ -9,7 +9,6 @@
true
-
@@ -25,6 +24,4 @@
-
-
-
\ No newline at end of file
+
diff --git a/ffi/dotnet/Devolutions.IronRdp.AvaloniaExample/MainWindow.axaml.cs b/ffi/dotnet/Devolutions.IronRdp.AvaloniaExample/MainWindow.axaml.cs
index b59f6680..ccc63266 100644
--- a/ffi/dotnet/Devolutions.IronRdp.AvaloniaExample/MainWindow.axaml.cs
+++ b/ffi/dotnet/Devolutions.IronRdp.AvaloniaExample/MainWindow.axaml.cs
@@ -48,8 +48,6 @@ public partial class MainWindow : Window
AvaloniaXamlLoader.Load(this);
}
- bool _resizeTaskStarted = false;
-
protected override void OnSizeChanged(SizeChangedEventArgs e)
{
base.OnSizeChanged(e);
@@ -94,10 +92,11 @@ public partial class MainWindow : Window
var config = BuildConfig(username, password, domain, _renderModel.Width, _renderModel.Height);
CliprdrBackendFactory? factory = null;
- var handle = GetWindowHandle();
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && handle != null)
+
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
- _cliprdr = WinCliprdr.New(handle.Value);
+ _cliprdr = WinCliprdr.New();
+
if (_cliprdr != null)
{
factory = _cliprdr.BackendFactory();
@@ -519,4 +518,4 @@ public sealed class RendererModel : INotifyPropertyChanged
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
-}
\ No newline at end of file
+}
diff --git a/ffi/dotnet/Devolutions.IronRdp.ConnectExample/Program.cs b/ffi/dotnet/Devolutions.IronRdp.ConnectExample/Program.cs
index a3fd3a1e..7fa4fffd 100644
--- a/ffi/dotnet/Devolutions.IronRdp.ConnectExample/Program.cs
+++ b/ffi/dotnet/Devolutions.IronRdp.ConnectExample/Program.cs
@@ -20,9 +20,10 @@ namespace Devolutions.IronRdp.ConnectExample
var username = arguments["--username"];
var password = arguments["--password"];
var domain = arguments["--domain"];
+
try
{
- var (res, framed) = await Connection.Connect(buildConfig(serverName, username, password, domain, 1980, 1080), serverName);
+ var (res, framed) = await Connection.Connect(buildConfig(serverName, username, password, domain, 1980, 1080), serverName, null);
var decodedImage = DecodedImage.New(PixelFormat.RgbA32, res.GetDesktopSize().GetWidth(), res.GetDesktopSize().GetHeight());
var activeState = ActiveStage.New(res);
var keepLooping = true;