예제 #1
0
파일: Hid.cs 프로젝트: mru00/hidapi
        public String GetManufacturerString()
        {
            AssertValidDev();
            byte[] buf = new byte[1000];
            int    ret = Hid.hid_get_manufacturer_string(dev, buf, (uint)(buf.Length / 4) - 1);

            if (ret < 0)
            {
                throw new Exception("failed to receive manufacturer string");
            }
            return(EncodeBuffer(buf));
        }
예제 #2
0
파일: Hid.cs 프로젝트: mru00/hidapi
        public string GetIndexedString(int index)
        {
            AssertValidDev();
            byte[] buf = new byte[1000];
            int    ret = Hid.hid_get_indexed_string(dev, index, buf, (uint)(buf.Length / 4) - 1);

            if (ret < 0)
            {
                throw new Exception("failed to receive indexed string");
            }
            return(EncodeBuffer(buf));
        }