Virtual Miniport/Display driver issue on Windows 7

I am working on virtual display driver which make use of WDM frame work.Basically,miniport driver does n’t do anything as it is not dealing with real hardware and any child devices like Monitor,FAX…etc.The issue is that both the drivers work fine but could n’t able to see the Secondry monitor in the “display properties”.It works fine in both XP and Vista.The issue is persist only with Windows 7.I am could not able to characterise this issue.Could any one please assist me resolve this issue.

Thanks in advance,
Santosh

Do you sure that your virtual display driver is working in Vista with WDDM ?
I have tested my virtual display driver which make use of WDM frame in 2008, But it can be work XPDM only, That is too say it can working in XP or Vista with XPDM, And can’t work in Vista with WDDM.

Best Regards
Allen

Allen,

In vista, we are loading the display drivers as “Mirror” driver.So, it is working.WDDM display drivers are comaptiable only with XDDM Mirror drivers.

Is it an mirror or virtual display driver?
You can get a virtual windows desktop if a virtual display driver be installed.
Exp: MaxiVista is an virtual display driver, and VNC/Netmeeting are mirror driver.
Which one is your?

On Mon, Apr 13, 2009 at 12:29:30AM -0400, xxxxx@rediffmail.com wrote:

Allen,

In vista, we are loading the display drivers as “Mirror” driver.So,
it is working.WDDM display drivers are comaptiable only with XDDM
Mirror drivers.

So, what you are saying is that you did not write a “WDM” driver, nor
did you write a “WDDM” driver. What you wrote is an “XPDM” mirror driver.
Is that correct?

Does your Windows 7 test system use a WDDM driver? If so, that (as you
correctly note here) will prevent your XPDM mirror driver from working.

Tim Roberts, xxxxx@probo.com
Providenza & Boeklheide, Inc.

No, I write a virtual display driver, It isn’t a mirror driver.
I test it in XP/Vista only, I don’t test it in Windows 7.

Let me elaborate the issue in detail :

It is a virtual miniport/display driver which comply WDM drivers.Basically,it act as the secondry monitor to the actual monitor and data written over the video shared memory is sent over the USB.

It works fine in Xp/Vista without any issues.
In windows 7,everthing works fine but it is not identifing as a monitor in “Display settings”.

Basically,miniport driver doesn’t do anything i.e. it is simply returning “true” from all the entry points.
Does i need to simulate in miniport driver that “Monitor” device has been connected to display ?
or any potential pitfalls could be in display driver?

Ok, I know. It’s a WDM driver only.
You said that the data is sent over the USB, Do you can move the window to your Monitor ?
You can hook the real display driver and deal with DxgkDdiQueryChildStatus,DxgkDdiQueryChildRelations … functions, If you want to able to see the Secondry monitor in the “display properties”.

Allen

Allen,

Thanks for reply.Basically, drivers written by using WDM frame work.But, whatever function you proposed will be used in WDF.please correct me if i am wrong.

In miniport driver , i responded HwGetChildDescriptor function with a fake child descriptor of type “Monitor” with appropriate UID and EDID.It is showing “Generic PNP Monitor” connected to our virtual display adapterin the device manager. But still it was not showing in the display properties.

Does i need to support anyother entrypoints like “QueryInterface” or any.

With regards,
Santosh

Are you responded HwGetChildDescriptor ?
It samed that is a XPDM driver. You should be respond DxgkDdiQueryDeviceDescriptor etc. in WDDM.
In those functions, you can fill your EDID info by USB.

Snap of code is here:

/*This is the syncmaster monitor EDID*/

UCHAR EDID= {0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x4C,0x2D,0xB7,0x01,0x37,0x31,0x41,0x48,0x10,0x11,0x01,0x03,0x0E,0x22,0x1B,0x78,0x2A,0xAA,0xA5,0xA6,0x54,0x54,0x99,0x26,0x14,0x50,0x54,0xBF,0xEF,0x80,0x81,0x80,0x81,0x40,0x71,0x4F,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x30,0x2A,0x00,0x98,0x51,0x00,0x2A,0x40,0x30,0x70,0x13,0x00,0x52,0x0E,0x11,0x00,0x00,0x1E,0x00,0x00,0x00,0xFD,0x00,0x38,0x4B,0x1E,0x51,0x0E,0x00,0x0A,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0xFC,0x00,0x53,0x79,0x6E,0x63,0x4D,0x61,0x73,0x74,0x65,0x72,0x0A,0x20,0x20,0x00,0x00,0x00,0xFF,0x00,0x48,0x48,0x42,0x50,0x34,0x30,0x33,0x38,0x37,0x35,0x0A,0x20,0x20,0x00,0x59};

if(FALSE==deviceExt->IsMonConnected)
{
*pChildType=Monitor;
VideoDebugPrint((0, “MiniPort::Reporting the monitor info…\r\n”));

RtlCopyMemory(pChildDescriptor,EDID,128);

*pUId=0x1;
deviceExt->IsMonConnected =true;
return VIDEO_ENUM_MORE_DEVICES;

}
return ERROR_NO_MORE_DEVICES;

and once i goto display properties , it alway call IOCTL_VIDEO_GET_CHILD_STATE where i am doing :

if(DevChildIndex==*((ULONG *)RequestPacket->InputBuffer))
{
PULONG ptr;
VideoDebugPrint((0, “—>Miniport:MATHCHING CHILD FOUND\r\n”));
ptr =(ULONG*)RequestPacket->OutputBuffer;
*ptr=(ULONG)VIDEO_CHILD_ACTIVE;

RequestPacket->OutputBufferLength = sizeof(ULONG);
RequestPacket->StatusBlock->Information = sizeof(ULONG);
RequestPacket->StatusBlock->Status =NO_ERROR;
return TRUE;
}
else
{
VideoDebugPrint((0, “—>Miniport:MATHCHING CHILD NOT FOUND\r\n”));
//RequestPacket->OutputBufferLength = sizeof(ULONG);
RequestPacket->StatusBlock->Information = 0;
RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
return TRUE;
}

when i goto display properties, it alway call IOCTL_VIDEO_GET_CHILD_STATE ,3 -4 times and does nt show in display properties. but it is showing the monitor name in “advanced->colormanagement->devices” dropdown list.

Am i doing anything wrong?

one more thing i forgotten to mention :
I can see the “Generic PNP monitor” in DM under my display adapter name.

Do you implement the dll module?
The follow is the description about Multimonitor Support in WDDM.
http://www.microsoft.com/whdc/device/display/multimonVista.mspx
"If multiple graphics adapters are present in a system, all of them must use the same WDDM driver. "

Allen

Yes, you can construct the EDID in driver, of course, you can get it from your device(USB).

xxxxx@sina.com wrote:

Do you implement the dll module?
The follow is the description about Multimonitor Support in WDDM.
http://www.microsoft.com/whdc/device/display/multimonVista.mspx
"If multiple graphics adapters are present in a system, all of them must use the same WDDM driver. "

He’s not doing WDDM. Hasn’t that become abundantly clear by now? He
keeps saying WDM for reasons that escape me, because that term is not
used in the display world, but what he means is XPDM. He has made an
XPDM display driver with a null miniport.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

> He’s not doing WDDM. Hasn’t that become abundantly clear by now? He

keeps saying WDM for reasons that escape me, because that term is not
used in the display world, but what he means is XPDM. He has made an
XPDM display driver with a null miniport.

I know that he is a WDM driver,
That is to say, he call IoCreateDevice to create the display device object but not call any function of videoprt.sys or DXGKrnl ( Exp: VideoPortInitialize , DxgkInitialize …).
So he must simulate everything, include but not limit read EDID.

Best Regards
Allen

Our miniport/display drivers are full fledged virtual drivers which responds to all the entry points.To justify it ,it works fine in XP/Vista.Basically,it is not recogising in windows 7 as "monitor " since microsoft has been introduced new feature called “CCD” connecting and config. the display .Basically,this interface read some information from monitor to show the name in the display properties.As ours is virtual display i.e. no child device is connected to it,i think i should simulate that child device of type monitor has been connected to it.

To make this what are the steps/procedure i need to follow in Miniport/display driver.
Please any one help me to unfold this issue.

Thanks,
Santosh

I think you should respond the specify request(for example : IOCTL_VIDEO_ENUM_MONITOR_PDO) and manage some specify operation about resistry(for example : device map).

Best Regards
Allen

Allen and Tim, thanks for answering my queries.

I am looking into windows 7 MSDN help , i came across with this

http://msdn.microsoft.com/en-us/library/dd434685.aspx

It has been mentioned that they introduced new interface callled “CCD” in the windows 7 and these API are not comapatiable with windows 2000 driver model.
Since ,our virtual display is XPDM driver.
Here i am bit confused :

Does it mean that it doesn’t recogise the monitor connected to XPDM display adapter by windows 7?.

Can any one please clarify this.

It doesn’t recogise the XPDM driver in windows 7.
Maybe you can hook DxgkInitialize and provide the new interface instead of the real interface, Of course you should call back to real interface in specify position.
By the way,
1, Are the DirectDraw and D3D support of your virtual driver?
2, Can you tell me how to capture the screen data when the exclusive mode is actived, For example : When we start a games or Windows Media Center by fullscreen.
I tested by mirror or DC(by GetDC, GetBits, BitBlt…) but it doesn’t captured, A blank bitmap be captured.

Best Regards,
Allen