///  <summary>
        ///  Find out if the current operating system is Windows 98 Gold (original version).
        ///  Windows 98 Gold does not support the following:
        ///  Interrupt OUT transfers (WriteFile uses control transfers and Set_Report).
        ///  HidD_GetNumInputBuffers and HidD_SetNumInputBuffers
        ///  (Not yet tested on a Windows 98 Gold system.)
        ///  </summary>
        public static Boolean IsWindows98Gold()
        {
            Boolean result = false;

            try
            {
                OperatingSystem myEnvironment = Environment.OSVersion;

                //  Windows 98 Gold is version 4.10 with a build number less than 2183.

                System.Version version98SE = new System.Version(4, 10, 2183);

                if (myEnvironment.Version < version98SE)
                {
                    Debug.WriteLine("The OS is Windows 98 Gold.");
                    result = true;
                }
                else
                {
                    Debug.WriteLine("The OS is more recent than Windows 98 Gold.");
                    result = false;
                }
                return(result);
            }
            catch (Exception ex)
            {
                Hid.DisplayException("IsWindows98Gold", ex);
                throw;
            }
        }
        ///  <summary>
        ///  Find out if the current operating system is Windows XP or later.
        ///  (Windows XP or later is required for HidD_GetInputReport and HidD_SetInputReport.)
        ///  </summary>
        public static Boolean IsWindowsXpOrLater()
        {
            try
            {
                OperatingSystem myEnvironment = Environment.OSVersion;

                //  Windows XP is version 5.1.

                System.Version versionXP = new System.Version(5, 1);

                if (myEnvironment.Version >= versionXP)
                {
                    Debug.WriteLine("The OS is Windows XP or later.");
                    return(true);
                }
                else
                {
                    Debug.WriteLine("The OS is earlier than Windows XP.");
                    return(false);
                }
            }
            catch (Exception ex)
            {
                Hid.DisplayException("IsWindowsXpOrLater", ex);
                throw;
            }
        }