IddSampleDriver icon indicating copy to clipboard operation
IddSampleDriver copied to clipboard

How can I create 2 virtual displays?

Open cuikeqiang opened this issue 2 years ago • 3 comments

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

cuikeqiang avatar Feb 08 '23 07:02 cuikeqiang

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

apexiptv avatar Feb 17 '23 07:02 apexiptv

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

cuikeqiang avatar Feb 17 '23 09:02 cuikeqiang

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

ge9 avatar Jun 13 '23 03:06 ge9