Exemplo n.º 1
0
        public static bool setVCPFeature(Monitors m, HNStruct.VCPFeature vcpfeature, uint newVal)
        {
            bool flag = SetVCPFeature(m.PhysicalMonitor.hphysicalMonitor, (byte)vcpfeature, newVal);

            for (int index = 0; index < 4 && !flag; ++index)
            {
                Thread.Sleep(200);
                flag = SetVCPFeature(m.PhysicalMonitor.hphysicalMonitor, (byte)vcpfeature, newVal);
            }

            return(flag);
        }
Exemplo n.º 2
0
        public static uint[] GetVCPFeature(Monitors m, HNStruct.VCPFeature vcpfeature)
        {
            uint pvct               = 0;
            uint pdwCurrentValue    = 0;
            uint pdwMaximumValue    = 0;
            bool andVcpFeatureReply = GetVCPFeatureAndVCPFeatureReply(m.PhysicalMonitor.hphysicalMonitor,
                                                                      (byte)vcpfeature, ref pvct, ref pdwCurrentValue, ref pdwMaximumValue);

            for (int index = 0; index < 4 && !andVcpFeatureReply; ++index)
            {
                Thread.Sleep(200);
                andVcpFeatureReply = GetVCPFeatureAndVCPFeatureReply(m.PhysicalMonitor.hphysicalMonitor,
                                                                     (byte)vcpfeature, ref pvct, ref pdwCurrentValue, ref pdwMaximumValue);
            }

            return(new uint[2] {
                pdwCurrentValue, pdwMaximumValue
            });
        }