WmiGetMonitorRawEEdidV1Block-Methode der WmiMonitorDescriptorMethods-Klasse
Die WmiGetMonitorRawEEdidV1Block-Methode ruft die Rohdaten für eine angegebene VeSA-Struktur (Video Electronics Standard Association) Enhanced Extended Display Identification Data (E-EDID) ab, die optimale Einstellungen für die Konfiguration eines Monitors definiert.
Syntax
uint32 WmiGetMonitorRawEEdidV1Block(
[in] uint8 BlockId,
[out] uint8 BlockType,
[out] uint8 BlockContent[]
);
Parameter
-
BlockId [ In]
-
Die Datenblockidentität.
-
BlockType [ out]
-
Typ des Datenblocks. In der folgenden Tabelle sind mögliche Rückgabewerte aufgeführt.
Wert Bedeutung - 0 (0x0)
Uninitialized - 1 (0x1)
EDID-Basisblock - 2 (0x2)
EDID-Blockzuordnung - 255 (0xFF)
Sonstiges -
BlockContent [ out]
-
Ein 128-Byte-Array, das den rohen Blockinhalt enthält.
Rückgabewert
Gibt null (0) zurück, um den Erfolg anzugeben. Jede andere Zahl gibt einen Fehler an. Weitere Informationen zu Fehlercodes finden Sie unter WMI-Fehlerkonstistenzen oder WbemErrorEnum.
Beispiele
Im folgenden Codebeispiel werden die EDID-Blöcke einer beliebigen Anzeige als unformatierte 128-Bit-Arrays abgerufen.
static void Main(string[] args)
{
ManagementClass mc = new ManagementClass(string.Format(@"\\{0}\root\wmi:WmiMonitorDescriptorMethods", Environment.MachineName));
foreach (ManagementObject mo in mc.GetInstances()) //Do this for each connected monitor
{
for (int i = 0; i < 256; i++)
{
ManagementBaseObject inParams = mo.GetMethodParameters("WmiGetMonitorRawEEdidV1Block");
inParams["BlockId"] = i;
ManagementBaseObject outParams = null;
try
{
outParams = mo.InvokeMethod("WmiGetMonitorRawEEdidV1Block", inParams, null);
Console.Out.WriteLine("Returned a block of type {0}, having a content of type {1} ",
outParams["BlockType"], outParams["BlockContent"].GetType());
}
catch { break; } //No more EDID blocks
}
}
}
Requirements (Anforderungen)
| Anforderung | Wert |
|---|---|
| Unterstützte Mindestversion (Client) |
Windows Vista |
| Unterstützte Mindestversion (Server) |
Windows Server 2008 |
| Namespace |
Root \ wmi |
| MOF |
|
| DLL |
|