c# - 有没有办法防止远程桌面锁定?
问题描述
我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();
}
}
我可以将这些鼠标移动发送到远程服务器吗?
提前致谢。
解决方案
推荐阅读
- sql - SQL 三重内连接
- javascript - JS reduce: TypeError: Cannot create property at Array.reduce
- google-cloud-firestore - 如果“没有任何规则的 1 个月”已过期,我是否必须开始一个新项目?
- android - 从 viewpager 2 停止并释放 exoplayer
- javascript - 如何在一个页面中多次重用一段Javascript
- r - Plotly:如何制作灰度饼图?
- python - Django readonly_fields 不显示数据
- python - pyspark 查询和 sql pyspark 查询
- machine-learning - 在机器学习中使用 CNN 将图像特征和数字特征结合在一起的最佳方法是什么?
- javascript - 将 promise 与 while 循环一起使用会导致 ui 冻结