Для программного обеспечения Windows 8/8/10/11, которое я в настоящее время создаю, мне нужно сканировать все подключенные мониторы и общаться с помощью DDC/CI (I²C), чтобы обнаружить те, которые из конкретного производителя. Затем я делаю некоторую связь DDC/CI, специфичную для производства. However, as Windows doesn't natively support VCP Table Read / VCP Table Write commands and VCP Get Feature and VCP Set Feature are horribly slow, when iterating over the connected monitors, I want to detect which graphics card a monitor is connected to, so that I can utilize graphics card libraries such as NVAPI for NVIDIA to perform such I2C commands.
That in itself to me seems (relatively) easy with Windows API: используйте EnumDisplayMonitors , чтобы получить All Homonitor и для каждого, итерацию по всем Allow_device с помощью enumdisplaydevices до тех пор, пока вы не найдете тот, который DeviceName идентичен имени устройства, полученного для Homonitor from getmonitorinfo (hmonitor) BOOL {
MONITORINFOEX monitor_info = { };
monitor_info.cbSize = sizeof(MONITORINFOEX);
if (GetMonitorInfo(hMonitor, &monitor_info) == 0) return TRUE;
std::wstring monitor_name = monitor_info.szDevice;
DISPLAY_DEVICE display_device = { };
display_device.cb = sizeof(DISPLAY_DEVICE);
for (DWORD index = 0; EnumDisplayDevices(nullptr, index, &display_device, 0); ++index) {
std::wstring device_name = display_device.DeviceName;
if (device_name == monitor_name) {
std::wstring device_id = display_device.DeviceID;
if (device_id.find(L"VEN_10DE") != std::wstring::npos) std::cout
Подробнее здесь: https://stackoverflow.com/questions/795 ... trike-goin