Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

WDDM Display Only Driver to create a Virtual Display/Monitor

muniateguimuniategui Member Posts: 5
edited May 26 in NTDEV

I am a student who just started in Windows Driver Development. The project I am trying to do is to create a Virtual Monitor and capturing its framebuffer.

The examples that Microsoft have about Display Drivers is a KMDOD and i don't know if i will be capable of archiving my goal using this type of driver.

Another doubt i have is that if KMDOD can use a real GPU to render the windows on the display. In WDDM 1.2 features documentation it says that "Windows handles the 2-D or 3-D rendering by using software-simulated GPU." but on MS forums "Even WDDM Display-Only-Drivers (which do not have a WDDM User Mode Driver) need actual graphics adapter hardware." so i do not know if the rendering would be done by HW GPU or SF GPU.


  • Mark_RoddyMark_Roddy Member - All Emails Posts: 4,307

    You would be much better off targeting Win7 (or XP) and starting with the sample XPDM mirror driver. A WDDM mirror is way outside the scope of a student project.

  • muniateguimuniategui Member Posts: 5
    edited May 30

    But is the XPDM model compatible on windowws 8.1 and above? I tougth it was not.
    Also the extrictly the feature i need is not mirror one but to create an independent virtual display i don't know if that can be achieved with mirror driver.

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,033

    No, it's not. Mark's point (and he is entirely correct) is that a WDDM driver is a very complicated beast, and is clearly not a good place for a beginner to start. If you are creating your own project, you should make another choice. The USB world is a much better place to learn about driver development. There are hundreds and hundreds of little USB experimenter's boards where you can control both the firmware on the device and the driver on the host.

    What's the point of a virtual monitor that's not a mirror? If the user can't see the results, he's never going to drag any windows to it, and he won't be able to interact with the windows to click any buttons.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • muniateguimuniategui Member Posts: 5

    The procjet has to be a display driver is not an option to change the driver type since what is wanted to archive with the driver is to capture the framebuffer to send it over the network. As KMDOD semed the easier option is what i've choose but still has the doubts about virtualized GPU

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,033

    You are aware, I hope, that there are dozens of products out there that do this, including several that are open source. Many of them do it with no kernel drivers at all. Have you looked at any of the VNC products?

    And if you want to capture a framebuffer, why would you not want to capture the live desktop? What is the point of capturing an invisible screen? I just don't think you have thought through this effort at all.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • muniateguimuniategui Member Posts: 5
    edited May 31

    In the scenario where it will work hooking functions is not an option since there are some incompativilities with that method. Aslo the monitors are needed to switch them between primary monitor when aplications are lanched to have one aplication in their own display to avoid superposition between them.

  • muniateguimuniategui Member Posts: 5

    Okay i've followed your recommendation and choosed to change to XPDM, apart from VirtualMonitor project source code where can i find more examples to create a virtual monitor? thanks!

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,033

    Your whole concept seems very strange to me. How is the user going to move an application to a monitor that he cannot see? How will he ever know that it is where it belongs? I just don't think you have worked through the user stories here. If you want to have a single application send its window over the network to another computer for remote display, there are traditional ways of doing that which are MUCH less trouble than writing a display driver.

    The Windows 7 (7600) DDK includes an XPDM mirror driver sample. That is probably your best starting point. Remember that the ONLY difference between a normal display driver and a mirror driver is the way it is configured. You would just change the user-mode app in that sample to configure the driver as an "extend the desktop" monitor instead of a mirror monitor.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Marcel_RuedingerMarcel_Ruedinger Member Posts: 132

    The long story can be cut very short:
    Creating virtual display monitors was never supported by recent Windows versions(since Windows 7). End of story.

    Two types of WDDM display drivers can reasonably be written by regular driver developers:
    WDDM DOD Display Only Drivers (e.g. KMDOD).
    WDDM IddCx Indirect Display Drivers.
    The downside of both: Currently they both need real hardware.
    The downside of Display Only Drivers: No GPU acceleration.

    For those who want to go beyond the regular and documented scope of Windows operating system support and really write a contemporary virtual display driver: Write a USB bus driver which emulates a USB bus with connected display device (e.g. DisplayLink USB display). Then install this WDDM IddCx Indirect Display sample on the virtual USB driver's emulated display device:
    Voila - there is your virtual display!

    Hint: I heard that the above named IddCx sample can supposedly even be operated without hardware when starting Windows with "Driver Signature Enforcement" disabled (F7).

    Marcel Ruedinger

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,033

    As a note to the original poster, Mr. Ruedinger knows what he is talking about.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA