Skip to content

Instantly share code, notes, and snippets.

@kumatti1
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kumatti1/dd426b87e3eecee1c97c to your computer and use it in GitHub Desktop.
Save kumatti1/dd426b87e3eecee1c97c to your computer and use it in GitHub Desktop.
MCCS
MCCSによる設定
MCCSクラスのGetVCPCurrentMaxMinValueの戻り値でどの設定が使えるか判断出来る。
MSのAPIと挙動が似てるのでどちらもMCCSて事なのかなと。
factory_defaultプロシージャを呼び出す際、GetVCPCurrentMaxMinValueで得られた最大値を
SetVCPValueで指定する事で工場出荷時設定に戻せる。
(こちらの環境だと65535)
Imports ServiceLibrary
'gfxSrvc.dll
Module Module1
Sub Main()
Dim objPenent As New CEDID
For i As UShort = 0 To 32
Dim objChild As New CEDID.CEDID_V1_Block
Dim tmp As uint32 = 1
Dim DevID As UInteger = tmp << i
objChild.DsiplayDev.U32DeviceID = DevID
If objPenent.GetEDIDBlock(objChild) Then
settings(objChild.DsiplayDev.U32DeviceID)
Exit For
End If
Next
End Sub
Private Sub settings(ByVal deviceID As UInteger)
Dim Current As UInteger = 0
Dim max As UInteger = 0
Dim min As UInteger = 0
Dim arg As UInteger = 4
Dim Dev As New CDevice(deviceID)
With New MCCS
Dim bRet As Boolean
bRet = .GetVCPCurrentMaxMinValue(Dev, arg, 2, Current, max, min)
Console.Write(bRet & vbCrLf)
Console.Write(Current & vbCrLf)
Console.Write(max & vbCrLf)
Console.Write(min & vbCrLf)
Console.ReadLine()
End With
End Sub
Private Sub factory_default(ByVal deviceID As UInteger)
Dim arg As UInteger = 4
Dim Dev As New CDevice(deviceID)
With New MCCS
Dim bRet As Boolean
bRet = .SetVCPValue(Dev, arg, 2, 65535)
Console.Write(bRet & vbCrLf)
Console.ReadLine()
End With
End Sub
End Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment