Re: Set up a virtual monitor problem

On 06/08/18 10:38 PM, 306451731@qq.com wrote:

I used the driver to virtualize a monitor, I can set the extension/independent display desktop and resolution at the screen resolution.

I’m curious, what driver is this?

I want to use the code to set the extended properties and resolution of this virtual monitor. Who has the relevant code examples to help me? ?

CCD API has been suggested. I’ll add that, at least in my experience,
the API is not too pleasant to use; it will easily give you
INVALID_PARAMETER and no idea why. I resorted to using Detours and
CreateRemoteThread() to inject a hook into Explorer.exe so I could log
how the system Display Resolution dialog box used the API.

-Nathan

I had the opposite experience with the CCD API, it was a breath of fresh
air compared to the obsolete XPDM user mode multi monitor api. Much easier
to use and much more reliable results. YMMV.

Mark Roddy

On Fri, Aug 10, 2018 at 10:43 AM xxxxx@spicycrypto.ca <
xxxxx@lists.osr.com> wrote:

On 06/08/18 10:38 PM, 306451731@qq.com wrote:
> I used the driver to virtualize a monitor, I can set the
extension/independent display desktop and resolution at the screen
resolution.

I’m curious, what driver is this?

> I want to use the code to set the extended properties and resolution of
this virtual monitor. Who has the relevant code examples to help me? ?

CCD API has been suggested. I’ll add that, at least in my experience,
the API is not too pleasant to use; it will easily give you
INVALID_PARAMETER and no idea why. I resorted to using Detours and
CreateRemoteThread() to inject a hook into Explorer.exe so I could log
how the system Display Resolution dialog box used the API.

-Nathan


NTDEV is sponsored by OSR

Visit the list online at: <
http://www.osronline.com/showlists.cfm?list=ntdev\>

MONTHLY seminars on crash dump analysis, WDF, Windows internals and
software drivers!
Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:>

On 10/08/18 12:57 PM, xxxxx@gmail.com wrote:

I had the opposite experience with the CCD API, it was a breath of fresh
air compared to the obsolete XPDM user mode multi monitor api. Much
easier to use and much more reliable results. YMMV.

(To be clear, I didn’t mean to imply “don’t use CCD”. Also in my
experience, SetDisplayConfig() is the only way to do things that
ChangeDisplaySettingsEx() simply won’t/can’t. However, if you have
trouble with the API, hooking explorer is a method of finding canonical
API usage on your system. -Nathan)