首页 > 解决方案 > 有没有办法防止远程桌面锁定?

问题描述

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

有什么方法可以实现这一目标吗?

编辑:

在我的系统中,为了防止它被锁定(因为我无法更改设置),我使用 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();
  }
}

我可以将这些鼠标移动发送到远程服务器吗?

提前致谢。

标签: c#

解决方案


推荐阅读