Giter VIP home page Giter VIP logo

Comments (9)

fufesou avatar fufesou commented on September 25, 2024 1

This tag may also meet your requirement.

https://github.com/fufesou/RustDeskIddDriver/releases/tag/v0.4

from rustdeskidddriver.

fufesou avatar fufesou commented on September 25, 2024

#6 (comment)

#6 (comment)

微软官方的例子里面就是加载驱动后就会同时创建一个显示适配器和一个显示器

Can you please show me the sample link?

from rustdeskidddriver.

HuntCode avatar HuntCode commented on September 25, 2024

好的,https://github.com/microsoft/Windows-driver-samples/tree/main/video/IndirectDisplay 这个是官方的示例链接,看上去您的项目也是基于这个迭代的,这个例子应该是最简单的处理了创建显示适配器和显示器

from rustdeskidddriver.

HuntCode avatar HuntCode commented on September 25, 2024

image
这里的驱动入口,里面直接配置了加载设备的方法,我的理解应该就是在加载驱动后,就会创建对应的设备,包含显示适配器和显示器

from rustdeskidddriver.

HuntCode avatar HuntCode commented on September 25, 2024

通过“设备管理器”-“添加过时硬件”-“找到安装的驱动”,最终添加完成设备后,设备管理器里就会出现一个显示适配器和一个显示器,但是我想通过API在代码中实现类似的效果,目前没有好的思路,只是在微软官方例子里面发现了SwDeviceCreate方法,但是这个方法应该是只能在调用进程运行过程中有效,进程退出后,显示适配器和显示器就会被关闭,这不是我想要的,我希望这两个设备一直是保持plugin的状态,所以想请教下是否有什么方法直接加载驱动,类似手动添加过时硬件,因为我不是一个驱动开发者,所以很多关于驱动开发的流程不是很清楚,感谢您的回复!

from rustdeskidddriver.

fufesou avatar fufesou commented on September 25, 2024

看上去您的项目也是基于这个迭代的,这个例子应该是最简单的处理了创建显示适配器和显示器

是的

通过“设备管理器”-“添加过时硬件”-“找到安装的驱动”,最终添加完成设备后,设备管理器里就会出现一个显示适配器和一个显示器

我大概翻了下文档,也没有找到方法。
我之前看到的,驱动分为内核驱动和非内核驱动。内核驱动可以在启动时就加载,非内核驱动需要驱动管理程序控制加载,驱动管理程序是做成系统服务的。

除此之外,也不知道怎样能在开机的时候就加载设备驱动。

from rustdeskidddriver.

HuntCode avatar HuntCode commented on September 25, 2024

我之前看到的,驱动分为内核驱动和非内核驱动。内核驱动可以在启动时就加载,非内核驱动需要驱动管理程序控制加载,驱动管理程序是做成系统服务的。

感谢您的回复

我是不是可以理解为Idd驱动本身被定义成非内核驱动?无法自动加载?因为官方文档显示Idd驱动只有用户模式,没有提供内核模块https://learn.microsoft.com/en-us/windows-hardware/drivers/display/indirect-display-driver-model-overview

关于服务管理这点我找到了一点印证,有一款叫spacedesk的软件会运行一个系统服务,如果我手动停止这个服务,之前spacedesk创建的显示适配器就会关闭

然而另外有一个usbmmidd_v2驱动包,里面通过deviceinstaller.exe可以安装一个显示适配器,这点我很好奇是怎么进行持久化处理的,看上去就像用添加过时硬件一样,设备管理器中会出现一个设备,感觉不像是启动了一个服务,因为驱动包里面好像没有服务程序的exe文件
usbmmidd_v2.zip

from rustdeskidddriver.

fufesou avatar fufesou commented on September 25, 2024

或许是这两个接口,我有空会尝试一下

https://learn.microsoft.com/en-us/windows/win32/api/setupapi/nf-setupapi-setupdicreatedeviceinfoa

https://learn.microsoft.com/en-us/windows/win32/api/setupapi/nf-setupapi-setupdicallclassinstaller

from rustdeskidddriver.

HuntCode avatar HuntCode commented on September 25, 2024

是的,应该就是这两个主要接口

我发现deviceinstaller.exe这个程序就是编译的微软工具DevCon.exe源码
https://github.com/Microsoft/Windows-driver-samples/tree/main/setup/devcon

from rustdeskidddriver.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.