Skip to content

Commit

Permalink
Another tweak for MsRdpEx
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKoell committed Apr 15, 2024
1 parent cba50c6 commit e114ca6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/RoyalApps.Community.Rdp.WinForms/Controls/RdpControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -583,16 +583,17 @@ private void CreateRdpClient()
}
}

if (MsRdpExManager.Instance.AxHookEnabled)
RdpClient.RdpExDll = MsRdpExManager.Instance.CoreApi.MsRdpExDllPath;

if (string.IsNullOrWhiteSpace(msRdcAxLibrary))
{
Logger.LogWarning("Microsoft Remote Desktop Client cannot be used, rdclientax.dll was not found");

Environment.SetEnvironmentVariable("MSRDPEX_MSTSCAX_DLL", msTscAxLibrary);
Environment.SetEnvironmentVariable("MSRDPEX_AXNAME", "mstsc");

RdpConfiguration.UseMsRdc = false;
RdpClient.AxName = "mstsc";
RdpClient.RdpExDll = null!;
}
else
{
Expand All @@ -602,7 +603,6 @@ private void CreateRdpClient()
Environment.SetEnvironmentVariable("MSRDPEX_AXNAME", "msrdc");

RdpClient.AxName = "msrdc";
RdpClient.RdpExDll = MsRdpExManager.Instance.CoreApi.MsRdpExDllPath;
}
}

Expand Down

0 comments on commit e114ca6

Please sign in to comment.