From: Ivan Brugiolo [MSFT] on
# further comment on SURFOBJ in a mirror driver.

The check should be something like.

if (STYPE_DEVBITMAP == pSo->iType ||
STYPE_DEVICE == pSo->iType) {
// do some kind of network encoding
return TRUE;
} else if (NULL == pSo->dhSurf && STYPE_BITMAP == pSo->iType) {
// this is an Eng-Managed surface, punt-to-eng
return EngXXX(pSo);
} else {
return FALSE;
}

One more comment:
When you have a DrvXXX operation that takes one
destination SURFOBJ, then, you should never get a STYPE_BITMAP surface.
But, when you have a DrvXXX operation that takes TWO surfaces
(eg: DrvCopyBits, DrvBitBlt) then, you are expected to receive at least one
device managed SURFOBJ, but, the other SURFOBJ
can legitimately be a STYPE_BITMAP.

This would make sense with the fact that you said
it never occurred in DrvTextOut, that is a single destination operation,
but, you received that in some other DrvXXX call.
I would recomend to extra check those cases, because returning FALSE
from them would not be the correct thing to do.

# callstack
If you are using the kernel debugger (as any kernel mode developer should),
the callstack of a bugcheck can be generated by issuing the `kb` command.

--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Rudi De Vos" <ultravnc(a)nospam.nospam> wrote in message
news:DF7A45DC-4301-4A4C-A6AA-95D65E1D419B(a)microsoft.com...
> Indeed, i installed the directx SDK and tried the samples.
> Using Window mode all is perfect displayed, fullscreen -> black
> I guess this is the normal behaviour, and for our application (ultravnc)
> full screen directx for the screensavers would only consume to mutch
> network
> bandwidth.
>
>
> DrvTextout( IN SURFOBJ *psoDest..)
> {
> ...
> mirrorsurf= (MIRRORSURF *) psoDst->dhsurf
> if (mirrorsurf==NULL) return FALSE; <<<------Added
> ..
> }
> The psoDest exist, but the dhsurf reffer to NULL.
> Adding the extra check does not make it slower and all is working. It was
> bad programming by not checking it on w2k/XP...Special for drivers.
>
> (dhsurf == NULL) happen when using clasic theme and right click on
> background
> It's not only drvtextout, but also other functions have the same issue.
>
> Thanks for the help, i should have tested it in window mode.
> screenshot
> http://sc.uvnc.com/demo.jpg
>
> callstack: I never has done it before, if it could be usefull for you i
> need
> some info
> or page refferences for generating it.
>
> Greeting
> Rudi


From: Maxim S. Shatskih on
> If the machine where you have installed the mirror driver has an WDDM
> (formerly known as LDDM)

Sorry, but am I wrong that WDDM means - only pre-Vista style display driver,
while LDDM means - new Vista-style?

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim(a)storagecraft.com
http://www.storagecraft.com

From: Ivan Brugiolo [MSFT] on
For the longest time, the Vista display dirver model was called LDDM,
while the WindowsXP display driver model was called XPDM.
Then, somebody changed LDDM in WDDM.

WDDM == LDDM == Vista model
[AKA, no display DLL, a user mode component loaded by d3d9.dll
and a kernel mode miniport used by dxgkrnl.sys]

XPDM
[Display Driver DLL with DX support plus miniport].

--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Maxim S. Shatskih" <maxim(a)storagecraft.com> wrote in message
news:OAHWiiP7GHA.2248(a)TK2MSFTNGP04.phx.gbl...
>> If the machine where you have installed the mirror driver has an WDDM
>> (formerly known as LDDM)
>
> Sorry, but am I wrong that WDDM means - only pre-Vista style display
> driver,
> while LDDM means - new Vista-style?
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim(a)storagecraft.com
> http://www.storagecraft.com
>


From: Maxim S. Shatskih on
> WDDM == LDDM == Vista model
> [AKA, no display DLL, a user mode component loaded by d3d9.dll
> and a kernel mode miniport used by dxgkrnl.sys]

How is good old GDI mapped to this? Is Desktop Composition involved in this? Is
this mapping layer in win32k or somewhere else?

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim(a)storagecraft.com
http://www.storagecraft.com

From: Ivan Brugiolo [MSFT] on
There is a system provided display driver, called cdd.dll, that is in
charge all the times that desktop composition in NOT active.
cdd.dll is a Punt-to-Eng display driver, and, furthermore, it performs
synchronization with video memory with a custom interface with dxgkrnl.sys.
When there is desktop composition active, then,
there is no display driver whatsoever, and, the GDI applications are
redirected
to eng-managed bitmaps.

--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Maxim S. Shatskih" <maxim(a)storagecraft.com> wrote in message
news:%23hmh1VX7GHA.4568(a)TK2MSFTNGP02.phx.gbl...
>> WDDM == LDDM == Vista model
>> [AKA, no display DLL, a user mode component loaded by d3d9.dll
>> and a kernel mode miniport used by dxgkrnl.sys]
>
> How is good old GDI mapped to this? Is Desktop Composition involved in
> this? Is
> this mapping layer in win32k or somewhere else?
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim(a)storagecraft.com
> http://www.storagecraft.com
>