/// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="gainOffset">The source object from which data will be copied from.</param>
 public GainOffset ( GainOffset gainOffset )
 {
     RedGain = gainOffset.RedGain;
     GreenGain = gainOffset.GreenGain;
     BlueGain = gainOffset.BlueGain;
     RedOffset = gainOffset.RedOffset;
     GreenOffset = gainOffset.GreenOffset;
     BlueOffset = gainOffset.BlueOffset;
 }
		/// <summary>
		/// The SetGainOffset function sets gain and offset values for the specified display.
		/// </summary>
		/// <param name="display">Specifies the type of the display.</param>
		/// <param name="data">Specifies gain and offset values for the display.</param>
		/// <returns>When this function succeeds, it returns S_OK. Otherwise it returns one of the following custom HRESULT error codes: <br></br><br></br> NotConnected <br></br> InvalidDisplayType <br></br> BadHandle <br></br> InvalidValue <br></br> USBWriteError</returns>
        public Error SetGainOffset ( DisplayType display , GainOffset data ) 
        {
            lock ( this )
            {
                if ( 0 != handle )
                    return ( Error ) SetGainOffset ( handle , display , data );
                else
                    return Error.BadHandle;
            }
        }