Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I create 2 virtual displays? #35

Open
cuikeqiang opened this issue Feb 8, 2023 · 3 comments
Open

How can I create 2 virtual displays? #35

cuikeqiang opened this issue Feb 8, 2023 · 3 comments

Comments

@cuikeqiang
Copy link

I called the function below twice, but only can create one virtual display, the second time it returned "SwDeviceCreate failed with 0x800700b7". Anyone knows how to create second virtual display?
HRESULT hr = SwDeviceCreate(L"IddSampleDriver",
L"HTREE\ROOT\0",
&createInfo,
0,
nullptr,
CreationCallback,
&hEvent,
&hSwDevice);

@apexiptv
Copy link

I was wondering same... says it works with 5 virtual

@cuikeqiang
Copy link
Author

cuikeqiang commented Feb 17, 2023

I was wondering same... says it works with 5 virtual

@apexiptv Try Microsoft's example: https://github.com/microsoft/Windows-driver-samples/blob/main/video/IndirectDisplay/IddSampleDriver/Driver.cpp

It will create 3 displays with different size.

You need to set this one to 3:
static constexpr DWORD IDD_SAMPLE_MONITOR_COUNT = 3; // If monitor count > ARRAYSIZE(s_SampleMonitors), we create edid-less monitors

@ge9
Copy link
Contributor

ge9 commented Jun 13, 2023

or you can use my fork , which is also mentioned in README.md in this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants