Tech Support > Microsoft Windows > Drivers > How can I modify the value of pam which is a parameter of function DrvEnablePDEV?
How can I modify the value of pam which is a parameter of function DrvEnablePDEV?
Posted by Sunwill Chen on September 9th, 2007


I know function DrvEnablePDEV in display drvier is called by GDI, and the
value of parameter pam which in type of DEVMODEW is passed to DrvEnablePDEV
from GDI. Maybe it is impossible to modify this vaue in GDI .
May I modify it in display driver?
Which funciton may I modify it in?
I would modify value of the default resolution which is in the parameter pam
..

Thanks,
Sunwill


Posted by Sunwill Chen on September 9th, 2007


I am sorry ,I have made a mistake. It is pdm not pam.

Thanks,
Sunwill


"Sunwill Chen" <sunwill_chen@hotmail.com> дÈëÏûÏ¢ÐÂÎÅ:uInlt2r8HHA.980@TK2MSFTNGP06.phx.gbl. ..


Posted by Ivan Brugiolo [MSFT] on September 9th, 2007


ChageDisplaySettingsEx is the API that will allow (under general
assumptions)
DrvEnablePDEV to be called with the specified DEVMODEW

--

--
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


"Sunwill Chen" <sunwill_chen@hotmail.com> wrote in message
news:upCQP8r8HHA.4736@TK2MSFTNGP06.phx.gbl...


Posted by Sunwill Chen on September 9th, 2007


Thank you very much! Ivan,

Do you means that I can make a application which contains
ChageDisplaySettingsEx to set the resolution in the specified value, and
install this application when after I install my display driver to set the
default resolution?


Now can you help me for my doubt?

As I know, there are some items in registry which related to resolution (In
my system, the path is "HKLM\SYSTEM\CurrentControlSet\Hardware
Profiles\0001\System\CurrentControlSet\Control\VID EO\{***1}"). When the
system starts, GDI would read the value of items in this path of
registry,and set the value of pdm parameter which would pass to
DrvEnablePDEV. When we uninstall the display driver and install it, there
are not some items in registry related to resolution before we change the
resolution in desktop (I found that when we uninstall the display driver,the
items in original path is disabled, and when we changed the resolution in
desktop setting, the registry would generate some new items in other path
such as "HKLM\SYSTEM\CurrentControlSet\Hardware
Profiles\0001\System\CurrentControlSet\Control\VID EO\{***2}"). Now when the
system restarts, GDI can't read the resolution from registry, and it uses
the default resolution which is set somewhere.

Are they right?

Thanks ,
Sunwill

"Ivan Brugiolo [MSFT]" <ivanbrug@online.microsoft.com> дÈëÏûÏ¢ÐÂÎÅ:OMu14Qs8HHA.1188@TK2MSFTNGP04.phx.gbl ...


Posted by Ivan Brugiolo [MSFT] on September 9th, 2007


It depends.
ChangeDisplaySettingsEx works on the currently installed
and enabled display drivers.
You would use-it with CDS_REGISTRY to store the configuration
once it was accepted by the user.
Depending on the driver model (XPDM - WDDM) and the transition
(VGASafe -> Something) or (something -> something-else) caused
by installing the new driver, ChangedDisplaySettingsEx may
or may not work to do what you are asking.

As I was explaining in an earlier post, the `default` resolution is really
the
first item in the array of video modes returned in DrvGetModes,
unless there is a transtion between resolutions, and, the
best-same-resolution
matching algorith finds something better.

Are you trying to automate some sort of setup ?
Or are you trying to load a display driver on the fly and get it to work ?

If you are automating setup, then, you might want to use the unattend
options
to get close to yuur goal.

--

--
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


"Sunwill Chen" <sunwill_chen@hotmail.com> wrote in message
news:ud3P%23xs8HHA.3900@TK2MSFTNGP02.phx.gbl...


Posted by Sunwill Chen on September 10th, 2007


Thank you !

"Ivan Brugiolo [MSFT]" <ivanbrug@online.microsoft.com> дÈëÏûÏ¢ÐÂÎÅ:O$N7ZKx8HHA.5424@TK2MSFTNGP02.phx.gbl ...