Ivan
Tue Jun 27 01:09:50 CDT 2006
That sequence looks completely reasonable for one PDEV lifetime.
I must be missing the whole picture. Let's say:
-1- the user changes screen resolution using desk.cpl
-2- some application listens for WM_DISPLAYCHANGE
-3- the application calls DeleteDC(hMirrorDriverDC);
This may cause the last reference to the DC to be dropped,
And DrvDisablePDEV should be called
-4- the application calls ChangeDisplaySettingsEx with the new values
-5- the application calls CreateDC() to get a DC for the mirror driver
Assuming the PDEV in your mirror driver is not global, but, instead,
allocated via EngAllocMem(), can you add to your debug log
the value of PDEV as a hex number ?
This should clarify which PDEV is object of which operation
--
--
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
"Simpy_A" <SimpyA@discussions.microsoft.com> wrote in message
news:EAE21FF0-BD81-4D0A-841B-5BFDF2E21571@microsoft.com...
> Hi Ivan,
> Thanx for your reply.
> I am not expecting that previous PDEV will be active, but after disabling
> the old PDEV, new PDEV should be enabled, that is not occuring. These are
> the
> messages from functions of driver, which I saw in debugger on calling
> changedisplaysetting().
>
> DrvAssertMode called
> DrvEnablePDEV called
> DrvCompletePDEV called
> DrvEnableSurface called
> GDI DDML: Device 0, position 0, 0, 800, 600, rotation 0
> GDI DDML: Device 1, position 0, 0, 800, 600, rotation 0
> DrvResetPDEV called
> DrvCompletePDEV called
> DrvCompletePDEV called
> GDI DDML: \\.\DISPLAY1 - iDitherFormat is 6, and this is primary.
> GDI DDML: \\.\DISPLAYV1 - iDitherFormat is 6.
> GDI DDML: \\.\DISPLAYV1 - PalManaged - No
> GDI DDML: \\.\DISPLAYV1 - iPalMode is 8.
> GDI DDML: \\.\DISPLAYV1 is compatible as primary.
> GDI DDML: 2 devices at (0, 0, 800, 600).
> DrvDisableSurface called
> DrvDisablePDEV called
>
> After it no more function is called. Can you tell me what I am missing
> here?
>
> "Ivan Brugiolo [MSFT]" wrote:
>
>> Why would you expecte the PDEV created for the
>> previous settings to stay around ?
>> The PDEV is logically the context that driver and win32k.sys
>> use to maintain state for the current video settings.
>>
>> --
>> --
>> 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
>>
>>
>> "Simpy_A" <SimpyA@discussions.microsoft.com> wrote in message
>> news:66D6D9DA-E877-4C1A-BB9B-6B79AD1E49E9@microsoft.com...
>> >I want to change the modes of mirror driver dynamically, when the
>> >resolution
>> > of primary display is changed.
>> >
>> > If I change the resolution of Primary display and then I call
>> > changedisplaysettings() for mirror driver with new mode, it disable the
>> > PDEV
>> > by calling the drvdisablePDEV()
>> >
>> > I think I have to do something more, can any body tell me what I am
>> > missing
>> > in this?
>>
>>
>>