Skip to content

Instantly share code, notes, and snippets.

@omonimus1
omonimus1 / main.cpp
Created November 28, 2022 14:44 — forked from PathogenDavid/main.cpp
EnumDisplayDevices
#include <Windows.h>
#include <stdio.h>
void PrintDisplayDevice(DISPLAY_DEVICEA* displayDevice, const char* indent = "")
{
printf("%sDeviceName: %s\n", indent, displayDevice->DeviceName);
printf("%sDeviceString: %s\n", indent, displayDevice->DeviceString);
printf("%sStateFlags:", indent);
if (displayDevice->StateFlags & DISPLAY_DEVICE_ACTIVE) { printf(" ACTIVE"); }
if (displayDevice->StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) { printf(" MIRRORING_DRIVER"); }