fufesou / RustDeskIddDriver

This IDD driver is based on official [Indirect Display Driver Sample](https://github.com/microsoft/Windows-driver-samples/tree/master/video/IndirectDisplay).
Microsoft Public License
73 stars 49 forks source link

custom resolution and refresh rate #1

Closed QQ2017 closed 2 years ago

QQ2017 commented 2 years ago

How to create a virtual monitor with custom resolution and refresh rate?

fufesou commented 2 years ago

As I know, IDD Driver is bonded to the hardware. You can only hard write params here .

If you want to create with custom resolution and refresh rate. You can only update modes after created.

  1. Change plugin param, and place modes. Then update modes here.
  2. Just call MonitorModesUpdate after monitor is successfully plugged.
QQ2017 commented 2 years ago

Thank you very much, I will try it

QQ2017 commented 2 years ago

RustDeskIddDriver.dll rustdeskidddriver.cat 这两个文件必须打sha256或微软硬件认证签名吗,打了sha1过期签名,在win10 20H1内核上无法安装上驱动.

fufesou commented 2 years ago

我没搞过签名这块,在我电脑上测试就直接禁掉签名验证的。

QQ2017 commented 2 years ago

通过 i 参数安装的驱动,会安装失败,通过手动添加过时设备的方法浏览inf文件,添加成功。

fufesou commented 2 years ago

用的管理员权限运行程序吧? 安装失败,在设备管理器那里有新增的未知设备吗?可以点过去,看看有什么错。

fufesou commented 2 years ago

通过 i 参数安装的驱动,会安装失败,通过手动添加过时设备的方法浏览inf文件,添加成功。

我刚才试了下, 如果没有权限 i 会打印报错,如果安装成功,会提示成功。然后再 c ,就可以再设备管理器看到新增的 driver了。

QQ2017 commented 2 years ago

通过 i 参数安装的驱动,会安装失败,通过手动添加过时设备的方法浏览inf文件,添加成功。

我刚才试了下, 如果没有权限 i 会打印报错,如果安装成功,会提示成功。然后再 c ,就可以再设备管理器看到新增的 driver了。

WIN10 是什么版本呢

QQ2017 commented 2 years ago

测的时候是管理员权限打开cmd中执行的

fufesou commented 2 years ago

win10 19042.1586 但应该跟windows版本无关吧,你既然能在命令行安装。 你装的时候报的什么错呢?

QQ2017 commented 2 years ago

image

QQ2017 commented 2 years ago

经过测试,先按c创建设备,然后在按i就能安装驱动了,每次测试都是纯净的系统环境 image

fufesou commented 2 years ago

经过测试,先按c创建设备,然后在按i就能安装驱动了,每次测试都是纯净的系统环境 image

厉害,是这样的!我刚看了 UpdateDriverForPlugAndPlayDevicesA 这个接口。第二个参数是需要指定已经存在设备的硬件id。硬件id或者兼容id是这里指定的。 应该是先 c 后 i ,不过有些奇怪的是,我这边先 i 后 c 也是没问题的

fufesou commented 2 years ago

我这边先i后c没问题,是因为我先前已经创建过 device 了。我的环境不干净。 那个 destroy device 似乎影响plug monitor。 create device后,然后destory device,也不会影响 i 的执行。