Mirror Driver - Attach.ToDesktop

Hi.
I’m developing Mirror Display Driver. And I got problem.
I can’t disable my driver after reboot.
I read ‘src\video\displays\mirror\app\readme.htm’ and I found that
"
HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\
Services\mirror [where ‘mirror’ is short name of mirrored surface]
device#\Attach.ToDesktop 0x1 (DWORD)

To disable the attachment, set ‘Attach.ToDesktop’ to 0x0. Otherwise your driver will
invoked again at boot up time. There are also other Default.Settings values saved under
this key, use ChangeDisplaySettings() with dwFlags=CDS_UPDATEREGISTRY to properly save
them."
So I tried to look to registry, but I don’t see any keys in Services key.
Could anyone can say me please, what I doing wrong?
I just want to disable my driver after reboot.

xxxxx@gmail.com wrote:

Hi.
I’m developing Mirror Display Driver. And I got problem.
I can’t disable my driver after reboot.
I read ‘src\video\displays\mirror\app\readme.htm’ and I found that
"
HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\
Services\mirror [where ‘mirror’ is short name of mirrored surface]
device#\Attach.ToDesktop 0x1 (DWORD)

To disable the attachment, set ‘Attach.ToDesktop’ to 0x0. Otherwise your driver will
invoked again at boot up time. There are also other Default.Settings values saved under
this key, use ChangeDisplaySettings() with dwFlags=CDS_UPDATEREGISTRY to properly save
them."
So I tried to look to registry, but I don’t see any keys in Services key.
Could anyone can say me please, what I doing wrong?
I just want to disable my driver after reboot.

Look in HKLM\SYSTEM\CurrentControlSet\Services\mirror\device#.


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

I tried. But I can open only until HKLM\SYSTEM\CurrentControlSet\Services and then I don’t see mirror key or something like that, because this hasn’t got any sub keys. But I’m sure that my mirror display driver is loading on every boot time.
Is this problem could be from not correct inf file?

> -----Original Message-----

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: 25 June 2008 09:40
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Mirror Driver - Attach.ToDesktop

I tried. But I can open only until
HKLM\SYSTEM\CurrentControlSet\Services and then I don’t see
mirror key or something like that, because this hasn’t got
any sub keys. But I’m sure that my mirror display driver is
loading on every boot time.
Is this problem could be from not correct inf file?

If you can enable your mirror driver then I’m sure your INF is good
enough. When you want to disable your mirror driver, do you set its mode
width and height to zero? As the example says on line 358 of
C:\WinDDK\6000\src\video\displays\mirror\app\main.cxx:
// Attach and detach information is sent via the
dmPelsWidth/Height
// of the devmode.

Tim Green
Development Engineer
DisplayLink (UK) Limited

I’m sorry. My fault. I’ve found key in HKLM\SYSTEM\CurrentControlSet\Services{Drivername}\Device0\ and string Attach.ToDesktop.
But i can’t understand following moments.
If just call ChangeDisplaySettingsEx it enables driver successfully. But in documentation says that I need first set ‘Attach.ToDesktop’ = 0x1 (But it works without this).
And If I set ‘Attach.ToDesktop’ = 0x0 and then I call ChangeDisplaySettingsEx with the same params except for set dmPelsWidth = 0 dmPelsHeight = 0 at next boot time driver is still loading.
Could anyone can tell me please, what operations exactly I need to do to enable my driver and to do my driver won’t load at next boot time?
(I’m using 3790 version of DDK and I can find in line 358 this comment)

I found that I’m not only trying to solve this problem. I see the same problem here http://www.tech-archive.net/Archive/Development/microsoft.public.development.device.drivers/2006-08/msg01265.html
without the answer.
Could anyone can say his assumption about this problem?