Ejemplo n.º 1
0
        public void TestMode()
        {
            int             hr = 0;
            AMTunerModeType mode;

            hr = tuner.get_Mode(out mode);
            DsError.ThrowExceptionForHR(hr);
            Debug.Assert(hr == 0, "IAMTVTuner.get_Mode");

            // My hardware just return me AMTunerModeType.TV and forbidden me to set another value
            // So just try to set AMTunerModeType.TV and check the return value
            hr = tuner.put_Mode(AMTunerModeType.TV);
            DsError.ThrowExceptionForHR(hr);
            Debug.Assert(hr == 0, "IAMTVTuner.put_Mode");
        }