I'm having the same problem that was referenced about a year ago in this
thread:
http://groups-beta.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/51715b3805247298/6b3237452b8466b1?q=%22mirror+driver%22+overlay&rnum=1#6b3237452b8466b1
However, the above thread ends without a confirmed resolution of the issue.
Curious if there is any more information available. I have tried all the
same tests described in that thread. I am also targeting DX7, but if it
would resolve the issue could target DX8.
Specifically, I have written a simple mirror driver based on the mirror
sample that is able to capture the coordinates (but not contents) of most
on-screen changes. Unfortunately, when this driver is active (attached to
the desktop), Windows disables DirectDraw support. This in turn, breaks DVD
playback, among other things. I do not care to capture the contents of any
updates (just the coordinates), but people get cranky when DVD playback is
broken.
Simply detaching the driver from the desktop resolves the problem, but
ordinary users cannot set the necessary registry setting to turn on/off the
driver as necessary. Also, this causes additional repaints of the entire
desktop when Windows modifies the display devices.
Another wrinkle, as mentioned in a different thread, is that if I test on a
multi-monitor system with the desktop extended that the problem does not
occur at all -- DirectDraw remains enabled despite the presence of the
mirror driver. If I could cause this behavior on a single-monitor system, I
would be all set.
I am looking for any of the following solutions:
1) A setting I may use to cause Windows to keep DirectDraw enabled when my
mirror driver is enabled. I would be very happy if Windows would simply
overlook my driver for the purposes of DirectDraw without hampering other
applications.
2) An example of a working DrvGetDirectDrawInfo for a mirror device. As
described in the previous thread on this topic, I see 2 calls to
DrvGetDirectDrawInfo, but no other DD calls. It would be helpful if this
were in the DDK sample code.
3) Suggestions of alternate workarounds.
Thanks,
Andy
Thank you for choosing the MSDN Managed Newsgroups,
Art Trumble
Microsoft Developer Support
This posting is provided “AS IS” with no warranties, and confers no rights.
I had already implemented both of those methods, but I walked through
section that section of the DDK docs that you suggested and double-checked
everything. I still see the same results (DirectDraw disabled)
I see DrvGetDirectDrawInfo called twice (as expected), but neither
DdGetDriverInfo nor any other dd callback are called after that.
I have filled out the lpD3DGlobalDriverData and lpD3DHALCallbacks entries in
the DD_HALINFO. I have added stub methods for the listed callbacks that
would at least produce debug output in windbg, but they are never called.
Question 1: It seems that there is some sort of litmus test occurring after
DrvGetDirectDrawInfo is called to determine whether my driver is worthy or
not. Is there any way to get insight into what exactly is failing?
Question 2: Does the miniport need to return valid display modes or fully
support any of the other commands in HwStartIO in order for DirectDraw to
work?
Right now, I just do this for IOCTL_VIDEO_QUERY_AVAIL_MODES and several
of the other IOCTLs
RequestPacket->StatusBlock->Status = NO_ERROR;
RequestPacket->StatusBlock->Information = 0;
Question 3: I am using dxdiag and the DirectX Caps Viewer to check the
status of my driver. Is there a better or more interactive way to check the
functionality?
I can attach source snippets if that would help (or email them offline)
Thank you again for your help.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\IniFileMapping\win.ini]
"DirectX"="SYS:Debug"
[HKEY_LOCAL_MACHINE\SOFTWARE\Debug]
"DDrawDebug"="0-9!^#>&+$"
This should cause ddraw.dll to spew error messages to your debugger. Your
looking for something like "****DirectDraw/Direct3D DRIVER DISABLING
ERROR****: ..."
If you want to fine tune the debug spew:
The output filter level ranging from 0->9. Almost all the information above
level 0 (error) is useless from the point of view of debugging an app. In
addition to the number, there are other characters that can be used to get
additional info. The full list of characters
! Break on asserts
^ Print TID of calling thread
# Print PID of calling process
> Indent on message detail levels
& Print the topic and detail level of each message
= Print function name
+ Print all topics, including topic-less
- Do not allow topic-less messages
$ Print source filename and line number of DPF
2. I don't think this will cause any dd problems.
3.dxdiag and the DirectX Caps Viewer are the best way to check your driver
functionality.
Thanks.
Download the checked version of the service pack update.
Use winzip to extract ddraw.dl_.
In a command window type "expand ddraw.dl_ ddraw.dll"
In safe mode copy ddraw.dll to %systemeroot%\system32
If you need more detail let me know.
(I am debugging against a virtual PC image, if that matters).
I see this:
Direct3D8: (Px6c,Tx01bc):: ddcreate.c@6041( 5): DirectDrawCreate: pid =
0000006c
Direct3D8: (Px6c,Tx01bc):: ddcreate.c@6046( 4): Reading Registry
Direct3D8: (Px6c,Tx01bc):: ddcreate.c@4976( 5): createDC(display)
Direct3D8: (Px6c,Tx01bc):: ddcreate.c@2861( 4): DirectDrawObjectCreate:
oldpdd == 0x00000000, reset = 0
Direct3D8: (Px6c,Tx01bc):: ddcreate.c@2872( 5): DIRECTDRAW object passed in
= 0x00000000
Direct3D8: (Px6c,Tx01bc):: ddcreate.c@2972( 4): oldpdd == 0x00000000, reset
= 0
Direct3D8: (Px6c,Tx01bc):: ddcreate.c@2987( 5): Driver Object: 2992 base
bytes
Direct3D8: (Px6c,Tx01bc):: ddcreate.c@3036( 5): WinNT driver conversation
started
Direct3D8: (Px6c,Tx01bc):: ddcreate.c@4976( 5): createDC(display)
Direct3D8: (Px6c,Tx01bc):: ddcreate.c@4865( 5): DeleteDC 0x0101006C
Direct3D8: (WARN) :(Px6c,Tx01bc):: ddcreate.c@3076( 1):
****DirectDraw/Direct3D DRIVER DISABLING ERROR****:First call to
DdQueryDirectDrawObject failed!
Direct3D8: (Px6c,Tx01bc):: ddcreate.c@6977( 5): pdrv = 0x00000000
Direct3D8: (Px6c,Tx01bc):: ddcreate.c@6980( 3): Got returned NULL pdrv!
Wondering why the "WinNT driver conversion" message...
I am investigating the DdQueryDirectDrawObject message.
Thank you for your help!
Is there any way to find out why the DdQueryDirectDrawObject call fails?
There is the error regarding 'pdrv being null', but I don't see that in any
of the structures I'm filling out in the driver.
Debugger output snippet, mirror driver DISABLED:
Direct3D8: (Px57c,Tx0594):: ddcreate.c@3036( 5): WinNT driver
conversation started
Direct3D8: (Px57c,Tx0594):: ddcreate.c@4976( 5): createDC(display)
Direct3D8: (Px57c,Tx0594):: ddcreate.c@4865( 5): DeleteDC 0x0101006F
Direct3D8: (Px57c,Tx0594):: ddcreate.c@3096( 5): numheaps = 0,
numfourcc = 0
Direct3D8: (Px57c,Tx0594):: ddcreate.c@3097( 5): ptrs: 0x00779B3C,
0x00779B14
Direct3D8: (Px57c,Tx0594):: ddcreate.c@3168( 5): NT driver video ram
data as reported by driver:
Direct3D8: (Px57c,Tx0594):: ddcreate.c@3169( 5):
VIDMEMINFO.fpPrimary =00000000
Direct3D8: (Px57c,Tx0594):: ddcreate.c@3170( 5): VIDMEMINFO.dwFlags
=00000000
Direct3D8: (Px57c,Tx0594):: ddcreate.c@3171( 5):
VIDMEMINFO.dwDisplayWidth =00000320
....
Debugger output snippet, mirror driver ENABLED:
Direct3D8: (Px450,Tx0454):: ddcreate.c@3036( 5): WinNT driver
conversation started
Direct3D8: (Px450,Tx0454):: ddcreate.c@4976( 5): createDC(display)
Direct3D8: (Px450,Tx0454):: ddcreate.c@4865( 5): DeleteDC 0x0101006C
Direct3D8: (WARN) :(Px450,Tx0454):: ddcreate.c@3076( 1):
****DirectDraw/Direct3D DRIVER DISABLING ERROR****:First call to
DdQueryDirectDrawObject failed!
Direct3D8: (Px450,Tx0454):: ddcreate.c@6977( 5): pdrv = 0x00000000
Direct3D8: (Px450,Tx0454):: ddcreate.c@6980( 3): Got returned NULL pdrv!
Direct3D8: (Px450,Tx0454):: ddfake.c@95( 5): getDisplayMode:
Direct3D8: (Px450,Tx0454):: ddfake.c@96( 5): bpp=32, refresh=75
Direct3D8: (Px450,Tx0454):: ddfake.c@97( 5): dwHeight=600,
dwWidth=800
Direct3D8: (Px450,Tx0454):: ddfake.c@98( 5): lStride=800
.....
Thanks for your help!
Check again. It doesn't say "driver conversion". It says "driver
conversation", as in "I'm starting to talk to your driver now."
--
- Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc
Clearly my mind is already on vacation for the long weekend.
Now hopefully the other problem I'm seeing is an equally straightforward
case of blurry vision.
I don't want to distract the mainline debugging with this, but I figured
it's worth asking.
Thanks.
You need to install the checked build of dxg.sys in
%systemroot%\system32\drivers.
If you don't see helpfull debug messages use the windbg command "ed
dxg!gWarningLevel ffff"
DXG: vDdEnableDriver: Driver returned invalid vmiData.pvPrimary
I was intentionally not allocating display memory for this device.
So... I allocated the necessary space and now I get further (DXG Assertion:
HalInfo.ddCaps.dwCaps indicate driver must hook Blt)
I will trod this path for a bit and see where it leads.
1) Is providing valid display a requirement to support DirectDraw?
2) Does it need to match the screen resolution/depth of the mirrored surface
in order to work correctly? (or can it be a small fixed size)
Thanks
Direct3D8: (WARN) :(Px604,Tx0608):: ddcreate.c@3076( 1):
****DirectDraw/Direct3D DRIVER DISABLING ERROR****:First call to
DdQueryDirectDrawObject failed!
Direct3D8: (Px604,Tx0608):: ddcreate.c@6977( 5): pdrv = 0x00000000
Direct3D8: (Px604,Tx0608):: ddcreate.c@6980( 3): Got returned NULL pdrv!
I will return to debugging on Tuesday. Any suggestions for obtaining more
debug detail are welcome. Thanks.
If you do manage to get this working, you would be doing the world (and
more precisely, me) a great service, if you let us know how you did it
:)
I'm itching to get back into this, but I just don't have time right
now...
Thanks,
Otto
I was referring to display memory, as pointed-to by pvPrimary. I would
rather not provide this because then I need to allocate enough memory to
cover the screen. However, this seems to be required with DirectDraw, so I
will deal with it. :)
> 2.You don't need to match the screen resolution or depth. You can position
> the mirrored surface anywhere you like. For example you could set the
> position to 100,100 and the size to 150,150. Your mirrored surface would
> receive only the drawing commands that overlap this area. I suspect this
> has something to do with your working multimon scenario.
I plan to cover the whole screen.. probably the entire virtual desktop in a
multi-monitor situation.
Do you have any more suggestions for obtaining additional information from
the Direct3D8 driver about the reason for this message:
Direct3D8: (WARN) :(Px604,Tx0608):: ddcreate.c@3076( 1):
****DirectDraw/Direct3D DRIVER DISABLING ERROR****:First call to
DdQueryDirectDrawObject failed!
After providing valid display memory and implementing the suggested HAL and
DdGetDriverInfo callbacks, I am back to this original message.... and
DirectDraw (and AGP Texture Acceleration) are disabled.
Is there better debugging information available if I upgrade my test box to
DX9? My end-goal is to support DX7, but I can test anywhere if it helps me
solve this problem.
Thanks.