none
How can I create a ghost monitor? RRS feed

  • Question

  • Hi, I've fallen down a rabbit hole while attempting to solve a problem, and have ended up here. I'm going to quickly explain how I got here to avoid the XY problem.

    The Setup:

    I am developing a two-part application which uses multiple monitors. The application on the primary monitor is used to manage the second application which displays full screen on the second monitor. We have automated tests which assert that the output on the second monitor is as expected following input on the application on the primary monitor. My task is to put our build/test/deployment process onto a build server using TeamCity/Bamboo etc.

    The Problem:

    The build server will only have one monitor (a simulated monitor? I'm not really sure how virtual machines work...), and will be in the cloud. I cannot use a hardware solution like this or a variation of this to run a second monitor, and without a second monitor the second application displays an error, and doesn't start up.

    The Rabbit-Hole:

    • First I found this old link but it seems the dfmirage drivers didn't work past Windows 7, and none of the other solutions listed on that page seem to work. This is the only solution I found for this issue, and everything else I found seemed to link to it. 
    • Next I started looking into the viability of using a second instance of windows running in a virtual machine, and connecting to it as a second monitor. I used VirtualBox to create a virtual instance of windows, but it seems that MiraCast is not supported for virtual machines.
    • My next idea was to create a fake MiraCast server which runs locally and pretends to be a monitor. However after the virtual box idea failed, I gave up on this because I'm assumed the build server would suffer from the same problem.
    • Finally I began looking into creating a driver which pretends to be a monitor, and does whatever would be necessary to pretend that this device is connected.

    The Question:

    Before I continue down this wild path which may not even be possible, can anyone suggest an alternative way of achieving what I'm trying to do? It's been years since I've programmed in C++, and I'd really rather not have to re-learn it and also learn the WDK to solve this (as it seems to me) simple problem.

    If not, is what I want to do possible? I was thinking creating a network monitor driver might work, alternatively I could try and fake a device being plugged in. I've downloaded the samples, and this one (in spite of its innaccurate description) seems to perform hardware faking, however it seems to be missing WpdServiceSampleDriver.h, and has a bunch of .tmh includes which I've never heard of and are highlighted as errors.

    I would really appreciate a point in the right direction here, I'm way out of my depth and while I'd be happy to dig deep, get learning, and figure out a way to solve the problem, I'm not sure that spending several weeks or even months learning about and writing a driver is a good use of my time.

    Thanks for reading.

    Jamey


    Thursday, January 26, 2017 12:03 PM

All replies

  • Alternatively, is there a way I can populate the registry with a fake display driver? I can see my second monitor under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\DISPLAY, and the corresponding device container under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceContainers with the same id as my monitor, but I can't access the properties folder for some reason. I was thinking maybe there is an isConnected property or something, in which case maybe I could create a registry entry for a fake display and set that property to true....

    Thursday, February 2, 2017 1:47 PM
  • whacking on the Enum key won't make a second display show up

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, February 2, 2017 4:37 PM