WmiMonitorDescriptorMethods クラスの WmiGetMonitorRawEEdidV1Block メソッド
WmiGetMonitorRawEEdidV1Block メソッドは、モニターを構成するための最適な設定を定義する、指定された Video Electronics Standard Association (VESA) Enhanced Extended Display Identification Data (E-EDID) 構造体の生データを取得します。
構文
uint32 WmiGetMonitorRawEEdidV1Block(
[in] uint8 BlockId,
[out] uint8 BlockType,
[out] uint8 BlockContent[]
);
パラメーター
-
BlockId [in]
-
データ ブロック ID。
-
BlockType [out]
-
データ ブロックの種類。 次の表に、可能な戻り値の一覧を示します。
値 説明 - 0 (0x0)
初期化されていません - 1 (0x1)
EDID ベース ブロック - 2 (0x2)
EDID ブロック マップ - 255 (0xFF)
その他 -
BlockContent [out]
-
未加工のブロック コンテンツを含む 128 バイトの配列。
戻り値
成功を示す 0 を返します。 それ以外の数値はエラーを示します。 エラー コードの詳細については、「 WMI エラー定数 」または 「WbemErrorEnum」を参照してください。
例
次のコード例では、任意のディスプレイの EDID ブロックを生の 128 ビット配列として取得します。
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
}
}
}
必要条件
要件 | 値 |
---|---|
サポートされている最小のクライアント |
Windows Vista |
サポートされている最小のサーバー |
Windows Server 2008 |
名前空間 |
Root\wmi |
MOF |
|
[DLL] |
|