示例#1
0
        public uint GetNumberInputBuffers()
        {
            lock (lockObject)
            {
                if (reference == null)
                {
                    throw new InvalidOperationException("The HID reference is null.");
                }
                else if (reference.IsInvalid)
                {
                    throw new InvalidOperationException("The HID reference is invalid");
                }

                uint ret;
                if (!Hid.HidD_GetNumInputBuffers(reference, out ret))
                {
                    throw new PInvoke.Win32Exception();
                }

                return(ret);
            }
        }