C# 有没有办法防止远程桌面锁定?

C# 有没有办法防止远程桌面锁定?,c#,C#,我在c#应用程序中使用AxMsRdpClient8NotSafeForScripting连接到远程服务器。现在我想阻止远程桌面锁定 我有什么办法可以做到这一点吗 编辑: 在我的系统中,为了防止它被锁定(因为我无法更改设置),我使用了MouseJiggle应用程序,它基本上会反复向系统发送鼠标移动 public static class Jiggler { internal const int INPUT_MOUSE = 0; internal const int MOUSEEVENTF

我在c#应用程序中使用
AxMsRdpClient8NotSafeForScripting
连接到远程服务器。现在我想阻止远程桌面锁定

我有什么办法可以做到这一点吗

编辑:

在我的系统中,为了防止它被锁定(因为我无法更改设置),我使用了MouseJiggle应用程序,它基本上会反复向系统发送鼠标移动

public static class Jiggler
{

  internal const int INPUT_MOUSE = 0;
  internal const int MOUSEEVENTF_MOVE = 1;

  [DllImport("user32.dll", SetLastError = true)]
  private static extern uint SendInput(uint nInputs, ref INPUT pInputs, int cbSize);

  public static void Jiggle(int dx, int dy)
  {
    if (Jiggler.SendInput(1U, ref new INPUT()
    {
      TYPE = 0,
      dx = dx,
      dy = dy,
      mouseData = 0,
      dwFlags = 1,
      time = 0,
      dwExtraInfo = (IntPtr) 0
    }, 28) != 1U)

      throw new Win32Exception();
  }
}
我可以将这些鼠标移动发送到远程服务器吗


提前感谢。

@HansPassant感谢您的评论,但不幸的是,我无法编辑远程服务器上的任何设置。我更希望在我的c#代码中添加什么来实现这一点,比如是否有
AxMsRdpClient8NotSafeForScripting
的属性/方法可以帮助我将一些密钥发送到服务器或类似的东西?