Skip to content

Commit

Permalink
fix remote desktop client check
Browse files Browse the repository at this point in the history
  • Loading branch information
hdocsek committed Jan 28, 2025
1 parent 420914b commit c049569
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/RoyalApps.Community.Rdp.WinForms/Controls/RdpControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,14 @@ private void CleanupRdpClient(bool performDisconnect = false)

private void CreateRdpClient()
{
var msTscAxDllPath = GetMsTscAxDllPath();
var msRdcAxDllPath = GetRdClientAxDllPath();
var rdcClientInstalled = !string.IsNullOrWhiteSpace(msRdcAxDllPath);

RdpClient = RdpClientFactory.Create(
RdpConfiguration.ClientVersion,
MsRdpExManager.Instance.AxHookEnabled ? MsRdpExManager.Instance.CoreApi.MsRdpExDllPath : null,
RdpConfiguration.UseMsRdc);
RdpConfiguration.UseMsRdc && rdcClientInstalled);

((ISupportInitialize)RdpClient).BeginInit();
Environment.SetEnvironmentVariable("MSRDPEX_LOG_ENABLED", RdpConfiguration.LogEnabled ? "1" : "0");
Expand All @@ -578,9 +582,6 @@ private void CreateRdpClient()
control.Dock = DockStyle.Fill;
Controls.Add(control);

var msTscAxDllPath = GetMsTscAxDllPath();
var msRdcAxDllPath = GetRdClientAxDllPath();

if (RdpConfiguration.UseMsRdc && !string.IsNullOrWhiteSpace(msRdcAxDllPath))
{
Logger.LogDebug("Microsoft Remote Desktop Client (rdclientax.dll) will be used");
Expand Down

0 comments on commit c049569

Please sign in to comment.