Один из методов с DXGI.Например:
С объявлениями DXGI: (Я не могу их вставить, слишком большой ...) VB_DXGI.vb =>
Dim hr As HRESULT = HRESULT.E_FAIL
Dim pFactory1 As IDXGIFactory1 = Nothing
Dim IID_IDXGIFactory1 As Guid = New Guid("770AAE78-F26F-4DBA-A829-253C83D1B387")
hr = CreateDXGIFactory1(IID_IDXGIFactory1, pFactory1)
If ((hr = HRESULT.S_OK) And (pFactory1 IsNot Nothing)) Then
Dim i As Integer = 0
Dim pAdapter1 As IDXGIAdapter1 = Nothing
While (pFactory1.EnumAdapters1(CUInt(i), pAdapter1) <> DXGI_ERROR_NOT_FOUND)
Dim dxAdapterDesc As DXGI_ADAPTER_DESC = New DXGI_ADAPTER_DESC()
hr = pAdapter1.GetDesc(dxAdapterDesc)
Console.WriteLine("Adapter Name: {0}", dxAdapterDesc.Description)
Console.WriteLine("Dedicated Video Memory : {0}", dxAdapterDesc.DedicatedVideoMemory.ToString())
Console.WriteLine("Shared System Memory : {0}", dxAdapterDesc.SharedSystemMemory.ToString())
Console.WriteLine("Dedicated System Memory : {0}", dxAdapterDesc.DedicatedSystemMemory.ToString())
Console.WriteLine("Total Memory : {0}", (dxAdapterDesc.DedicatedVideoMemory + dxAdapterDesc.SharedSystemMemory + dxAdapterDesc.DedicatedSystemMemory).ToString())
Dim pOutput As IDXGIOutput = Nothing
Dim j As Integer = 0
While (pAdapter1.EnumOutputs(CUInt(j), pOutput) <> DXGI_ERROR_NOT_FOUND)
Dim outputDesc As DXGI_OUTPUT_DESC = New DXGI_OUTPUT_DESC()
hr = pOutput.GetDesc(outputDesc)
Console.WriteLine(vbTab + "Device : {0} ({1}, {2}, {3}, {4})", outputDesc.DeviceName, outputDesc.DesktopCoordinates.left, outputDesc.DesktopCoordinates.top, outputDesc.DesktopCoordinates.right, outputDesc.DesktopCoordinates.bottom)
j += 1
Marshal.ReleaseComObject(pOutput)
pOutput = Nothing
End While
i += 1
Marshal.ReleaseComObject(pAdapter1)
pAdapter1 = Nothing
End While
Marshal.ReleaseComObject(pFactory1)
End If