Ray Of Hope

Extension of Desktop Win/Windows 7/Vista – Series 4

Enumeration , addition of source, target and path to the vidpn is complete.. I can see multiple monitor in the Desktop->properties window..

But now the requirement is that I need to dump the content of the extended monitor to a virtual memory or what we can say is that whatever is displayed on the extended desktop should be picked from my virtual memory.

Lot of time went.. Did R&D but to no avail.. There must be a function that can do the task for me.. But not able to decipher that.. Waiting Waiting…..

Then one day after being rebuffed by OSR people, specially from those who have their vested interest, someone shot a mail to me giving me the most desired hint..

Below is my communication with him..

Hello Anshul,</div>
There has not been progress on your WDDM articles anymore.
I’ve also noticed that OSR people has not been helping either.
Clarification, you are working only on NON-AERO. Glass Look is turned of by disabling DWM. I just want to know if you are on the same page. (Note that to support AERO, you need to hook the usermode driver DLL.)

Anyway, so now you can already see the additional monitors in the Display Properties. The next step is to identify the address of the screen content.
Is Present() already called for VidPnSourceId != 0 ? (Note that VidPnSourceId &gt; 0 corresponds to your additional monitors.)
If yes, then you will observe that Present-&gt;Flags.Blt is set. (Note that in NON-AERO, Present performs block transfer (BLT) while in AERO, Present performs flip operation (Flags.Flip) ). There is a source and destination pointers. You have to look for the destination buffer and access it. This data is called a Primary Surface. This primary surface is swizzled / encoded in NVIDIA and AMD. So you need to swizzle it first. This is slow though. However, this surface t is NOT swizzled in INTEL. So I suggest you try to work it out on you Intel on board graphics card.

If no, then make sure that Commit, SetSourceAddress, SetSourceVisibility and UpdateActivePresentPath are implemented such that if it is not for your additional monitors, then you perform nothing and return immediately.</div>
Hope it helps somehow. Let me know if you have some questions.

mail from my side

Excellent piece of information.. Very useful.
What I am aiming is, a simple remote USB desktop support (without AERO affect).
Yes, I can see additional monitors and also I am trying on Intel card only.
Now , after going through your mail, what I am thinking is to insert my code in DxgkDDIPresnet() function so as to make the miniport driver blt the content on to my target buffer. (which can then be read by the USB driver for transfer to secondary USB monitor). Is my assumption correct ?
One query, I am thinking of implementing my copy code in DxgkDDIPresent, but what you mentioned below is User Mode driver function “Present()”.. Is there a need to implement a user mode driver ?
I already have a kernel mode driver function working and the same can be used to achieve the desired functionality of copying. . Please suggest..
Thanks again for your useful suggestion.. Great!!! you made my day..”

Yes, just place your code in DxgkDdiPresent. Grab the screen content here. However, please not that there are cases when it would not be possible to grab the screen content in Present. Sometimes, you can only grab the screen content in Submit. This is because the information in Present is sometimes lacking. The information can be only retrieved in Submit. To make things easier, just try in Present first.

You can try to implement a simple windows application for displaying the screen content that was grabbed in Present. This will make things easier before you integrate your USB monitor.

Sorry for the confusion. I was talking about DxgkDdiPresent, not UMD Present(). (You only need to hook UMD Present for AERO Glass Look).

Please let me know if you have other questions. I will try to help you. I hate people in OSR, especially that Marcel guy who acts as if he knows everything but does not even contribute to the WDDM community. It’s time that guys like you share knowledge to the community.

Looking forward to more updates at your website. ”
I hope the series of articles have proved to be useful to developer community. Please feel free to mail me your queries or if any other information is desired.</div>
OSR really is a big disappointment !!!
Anshul Makkar

Originally Posted On: 2011-12-23 10:44:53

Anshul Makkar


7 Responses to “Extension of Desktop Win/Windows 7/Vista – Series 4”

  • nicole says:

    I still cant uanderstand that how you make a USB Moniter Driver read framebuffer data form your virtual memory.

    • anshulmakkar says:

      Graphics driver writes the data to the shared memory (I used section object). This data is then read by the user mode application that reads the shared memory and then transfer it to usb client driver to be transported via USB to other device.

    • anshulmakkar says:

      I am not sure what is the problem you see there. USB monitor driver (IIRC), it was a function driver executing in user space and I shared memory between kernel mode and user space. Display driver used to blit the content on to the kernel space and it was shared with the user space from where USB monitor driver used to read.
      Let me know specifics of where you are having doubts and I will be able to provide further insights.

  • Jaylon says:

    I develeped a WDDM Filter on the win7 OS, I was able to make the Vidpn cofunctional with the Windows Basic theme(with out Desktop Composition) and extend desktop display settings is also working quiet fine.

    But as soon as i enable Aero theme screen starts to flicker . so what DxgkDDIXXXX calls need to be handled to overcome this situation? please help, thanks!

  • donghui says:

    I downloaded your WDDM code on github and generated a driver file on the computer.
    It worked fine after installation, but the computer could not detect multiple monitors. Will I need to make some changes?

  • hake says:

    please tell me where to download WDDM code on github?

  • yisong says:

    how to proccess the i/o control code 0x230047f and 0x230043f. the V3DD KIT is implaymented them.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.