亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? deviceimpl.java

?? JAVA 訪問USB JAVA 訪問USB JAVA 訪問USB JAVA 訪問USB JAVA 訪問USB JAVA 訪問USB
?? JAVA
?? 第 1 頁 / 共 3 頁
字號(hào):
/* * DeviceImpl.java * * Created on 15. Juli 2003, 16:35 *//* * Java USB Library * Copyright (C) 2000 by David Brownell * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */package usb.windows;import java.io.IOException;import java.util.Hashtable;import java.util.Locale;import usb.core.*;import usb.util.LangCode;/** * Provides access to all USB devices on a bus in limited fashion.<br> * The device descriptor and configuration descriptor provides more information * to the devices which are attached to the bus. <br> * The devices itself are instances of the subclass NonJUSB when not using the  * jUSB driver and of the subclass JUSB when using the jUSB driver. * * @author  Mike Stahl * @version $id: DeviceImpl.java, v1.0 Created on 15. Juli 2003, 16:37  */public class DeviceImpl extends Device {        /**      * Corresponds to a hub port and indicates that no device is connected to that     * port.     */        public static final int NO_DEVICE_CONNECTED = 1;    /** Corresponds to a hub port and indicates that an external hub is connected to that     * port.     */        public static final int EXTERNAL_HUB = 2;    /** Corresponds to a hub port and indicates that a device is connected to that     * port.     */        public static final int USB_DEVICE = 3;    /**     * The number of ports on this hub, or zero if it's a device     */    private int numPorts;    /**     * The hub port number to which this device or hub is connected     */    private int hubPortNumber;    /**     * The bus to which this device or hub is connected     */    private final USB usb;        /**     * The devices that were on the USB before the scan     */    private static DeviceImpl oldDevices [] = new DeviceImpl [127];    /**     * usbDevicePath corresponds to the Windows DevicePath for this device     */    private String usbDevicePath;    /**     * This id is unique to every usb device. It is used to find out if something     * changed on the bus.     */    private String uniqueDevID;    /**     * The Windows driverKeyName for that device     */    private String driverKeyName;    /**     * Friendly Name of the Driverkey     */    private String friendlyDeviceName;        private DeviceImpl hub;    private DeviceImpl children[];    /** The device descriptor */        public  DeviceDescriptor	descriptor;     /** The configuration descriptor */        public Configuration configuration;        /** used to create an instance of the root hub     * @param bus The bus this device belongs to     * @param devicePath The Windows OS specific device path for that device     * @param address The device address (should be always 0, because this constructor is only called     * to create the root hub)     * @param devices Contains the current structure of the bus. Is used to compare if device have     * been removed or attached during the last scan.     * @throws IOException An exception is raised when we could not get a handle to the root hub     */    DeviceImpl(USB bus, String devicePath, int address,DeviceImpl devices[])    throws IOException {        super (null, bus, address);                this.usb = bus;        this.usbDevicePath = devicePath;        this.hubPortNumber = 0;        this.driverKeyName = null;        this.friendlyDeviceName = "Root Hub";        this.oldDevices = devices;        this.hub = null;        if(Windows.debugDeviceImpl){          System.out.println("DeviceImpl.Constructor() ROOT >>> Bus[ " +usb.getBusNum() + "]  --- Device[" + this + "]  --- Adr["+ address+ "] " + address + "  --- Port[" +hubPortNumber + "]" );          }                        //----------- R O O T   H U B ------------------------        // check if it is the root hub        if(devicePath != null && address == 0){          //we are accessing the root hub          //get the root hub handle and how many          //ports it contains                   int rootHubHandle = this.openHandle(devicePath);         if(rootHubHandle == USBException.ERROR_INVALID_HANDLE)             throw new USBException("INVALID_HANDLE_VALUE for roothub ",rootHubHandle);         this.numPorts = getNumPorts(rootHubHandle);         if(Windows.debugDeviceImpl) System.out.println("DeviceImpl.Constructor() ROOT >>> Root Hub (rootHubHandle:" + rootHubHandle + "numPorts:" + this.numPorts+")");         this.enumerateHubPorts(usb, rootHubHandle,this,this.numPorts);                  // close the root hub handle         this.closeHandle(rootHubHandle);                 }        else throw new USBException("This constructor is used only for a root hub",-1);                           }       /** used to create an instance of either an external hub or an usb device     * @param bus The bus object this device belongs to     * @param hub The device(hub) this device is a child of     * @param devicePath The Windows OS specific device path for that device     * @param address The device address     * @param driverKeyName The driver key name of that device<br>This look similiar to such a string     * {<device interface class>}     * @param friendlyDevName The friendly device name of that device     * @param uniqueID The unique ID     * @param portIndex The port number this device is connected to     * @throws IOException An exception is raised when we could not get a handle a hub or a JUSB device     */     DeviceImpl(USB bus,DeviceImpl hub, String devicePath, int address,String driverKeyName,String friendlyDevName, String uniqueID,int portIndex)     throws IOException {        super (null, bus, address);        this.usb = bus;        this.usbDevicePath = devicePath;        this.driverKeyName = driverKeyName;        this.friendlyDeviceName = friendlyDevName;        this.hubPortNumber = portIndex;        this.uniqueDevID = uniqueID;        if(Windows.debugDeviceImpl){          System.out.println("DeviceImpl.Constructor() DEV or HUB >>> Bus[ " +usb.getBusNum() + "]  --- Device[" + this.uniqueDevID + "]  --- Adr["+ address + "] " + address + "  --- Port[" +portIndex + "] ");          }                                this.hub = hub;                  //---------- E X T E R N A L    H U B -----------------         //         if(devicePath != null && address > 0){             int hubHandle = this.openHandle(devicePath);            if(hubHandle == USBException.ERROR_INVALID_HANDLE)                throw new USBException("INVALID_HANDLE_VALUE for external hub ",hubHandle);                        // to do:            // at this stage it would be useful to build the hub descriptor            // and all information that wanted to be know over an external hub            // ...                                   this.numPorts = getNumPorts(hubHandle);            if(Windows.debugDeviceImpl) System.out.println("DeviceImpl.Constructor() DEV or HUB >>> External Hub (hubHandle:" + hubHandle + "numPorts:" + this.numPorts+")");            this.enumerateHubPorts(usb, hubHandle,this,this.numPorts);                     // close the root hub handle            this.closeHandle(hubHandle);                                   }else                        //---------- U S B    D E V I C E -----------------         //         if(devicePath == null){                         // to do:            // at this stage it would be useful to build the hub descriptor            // and all information that wanted to be know over an external hub            // ...                                                            // to do:            // so far we have nothing to do anymore            // special thing gere is now to get access to a device            // especially read and writing data, get its decriptor and             // configuration.            // This will be part of the jusb driver                      }        else throw new USBException("This constructor is only used either for a external hub or a device",-1);      }     /** Native function that invokes the CreateFile WinAPI function with the given     * device path     * @param devicePath A Windows specific device path for that device     * @return A Windows handle for that device<br>     * if failed it returns USBException.ERROR_INVALID_HANDLE     */          public native int openHandle(String devicePath);    /** Native function that invokes the CloseFile WinAPI function with the given     * handle     * @param devHandle A valid device handle. This value must correspond to a former call of openHandle     * @return 1: when success and <br>-1: when failed to close the device     */        public native int closeHandle(int devHandle);        private native String getFriendlyDeviceName(String driverKeyName);    /**     *     * Returns EXTERNAL_HUB or DEVICE, or NO_DEVICE_CONNECTED     */    private native int  getAttachedDeviceType(int hubHandle,int portIndex);        /**     * Returns the number of ports that are supported by this hub     */    private native int  getNumPorts(int hubHandle);    /**     * Gives the driverkeyname of the device which is attached to the hub     * This value corresponds to the registry entry DeviceDesc which can be found     * under \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_xxxx&Pid_xxxx\..     */    private native String getDriverKeyNameOfDeviceOnPort(int hubHandle,int portIndex);    /**     * Returns the driver key name of that device     */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久久久久快鸭 | 欧美成人艳星乳罩| 国产成人精品aa毛片| 石原莉奈在线亚洲二区| 激情综合网av| 日韩欧美国产系列| 在线一区二区三区做爰视频网站| 日本一区中文字幕| 亚洲丝袜制服诱惑| 久久久久久久久久久久电影| 99在线视频精品| 国产精品一区免费在线观看| 五月天视频一区| 亚洲男人天堂一区| 国产精品素人一区二区| 日韩一区二区三区电影在线观看| 色哟哟在线观看一区二区三区| 国产激情偷乱视频一区二区三区| 久久国产精品色| 裸体一区二区三区| 久久99久久久久久久久久久| 天天操天天干天天综合网| 午夜精品久久一牛影视| 午夜精品一区二区三区免费视频| 亚洲欧美视频在线观看视频| 一色桃子久久精品亚洲| 国产精品对白交换视频| 亚洲日本中文字幕区| 亚洲免费观看高清完整版在线| 亚洲色图.com| 天堂成人国产精品一区| 免费xxxx性欧美18vr| 久久精品国产99国产| 国产精品18久久久久久久久| 高清shemale亚洲人妖| av男人天堂一区| 欧美综合天天夜夜久久| 欧美精品视频www在线观看| 欧美一区二区三区播放老司机| 91麻豆精品国产91久久久使用方法| 67194成人在线观看| 国产三级欧美三级| 一区二区三区视频在线看| 免费成人结看片| 99视频在线精品| 日韩免费视频一区| 国产精品不卡在线| 激情成人午夜视频| 欧美亚洲日本国产| 亚洲国产岛国毛片在线| 亚洲国产精品影院| 日韩av一区二区在线影视| 国产成人福利片| 制服丝袜在线91| 亚洲激情成人在线| 国产成人精品免费| 精品理论电影在线| 亚洲国产va精品久久久不卡综合| 国产成人精品综合在线观看 | 日韩制服丝袜先锋影音| 91丝袜美女网| 国产亚洲美州欧州综合国| 婷婷丁香久久五月婷婷| 日韩精品一区在线| 欧美va亚洲va香蕉在线| 国产一区二区在线观看免费 | 日本韩国欧美国产| 亚洲欧洲另类国产综合| 国产成人夜色高潮福利影视| 日韩亚洲国产中文字幕欧美| 亚洲一区二区三区在线播放| 成人app在线观看| 亚洲人成小说网站色在线| 97久久超碰精品国产| 亚洲少妇中出一区| 色综合欧美在线| 亚洲国产综合91精品麻豆| 欧美日韩一区二区三区四区| 亚洲激情中文1区| 欧美日韩一区高清| 免费观看一级特黄欧美大片| 精品国产髙清在线看国产毛片| 日韩精品久久久久久| 91麻豆精品91久久久久同性| 美女久久久精品| 久久久久久久免费视频了| 国产91在线观看| 自拍av一区二区三区| 欧美精品在线一区二区三区| 麻豆国产精品一区二区三区| www欧美成人18+| 91视频.com| 日韩 欧美一区二区三区| 欧美蜜桃一区二区三区| 免费观看91视频大全| 中文欧美字幕免费| 欧美一区二区视频在线观看2020| 国产在线国偷精品免费看| 亚洲视频 欧洲视频| 在线成人午夜影院| 99国产欧美久久久精品| 久草中文综合在线| 亚洲男帅同性gay1069| 精品国产污污免费网站入口| 色综合天天综合| 国产高清久久久| 久久精品国产77777蜜臀| 亚洲自拍偷拍网站| 国产欧美精品在线观看| 精品久久久久一区| 欧美色综合久久| 色综合久久综合| 成人av在线一区二区三区| 美女视频一区二区| 午夜不卡av免费| 午夜久久久影院| 亚洲一区二区欧美日韩| 中文字幕一区二区三中文字幕| 国产亚洲午夜高清国产拍精品| 884aa四虎影成人精品一区| 欧洲精品一区二区三区在线观看| 丰满岳乱妇一区二区三区| 国产乱人伦偷精品视频不卡 | 日韩欧美不卡在线观看视频| 欧美视频中文字幕| 欧美巨大另类极品videosbest | 欧美精三区欧美精三区| 欧美日韩黄色影视| 欧美精品乱码久久久久久| 欧美久久婷婷综合色| 日韩欧美中文字幕制服| 91麻豆精品国产91久久久久久久久 | 国产精品一卡二| 国产美女一区二区三区| 国产激情一区二区三区| av色综合久久天堂av综合| 色婷婷av久久久久久久| 欧美亚洲另类激情小说| 日韩一二三四区| 国产视频911| 一区二区三区四区国产精品| 日韩av不卡在线观看| 国产二区国产一区在线观看| 91丝袜美腿高跟国产极品老师 | 在线观看国产一区二区| 7777精品伊人久久久大香线蕉的| 亚洲精品在线电影| 亚洲免费在线观看视频| 免费观看30秒视频久久| aaa亚洲精品| 日韩精品一区国产麻豆| 亚洲老妇xxxxxx| 国产一区欧美日韩| 欧美日韩日日骚| 国产精品欧美久久久久无广告| 亚洲成人福利片| 成人av电影在线观看| 精品国产91久久久久久久妲己 | 成人丝袜18视频在线观看| 欧美福利视频一区| 亚洲免费在线播放| fc2成人免费人成在线观看播放| 91麻豆精品国产综合久久久久久| 最好看的中文字幕久久| 国产美女一区二区三区| 日韩一区二区三区免费观看| 亚洲一级片在线观看| 色综合亚洲欧洲| 亚洲欧美在线视频| 成人在线综合网| 国产三级一区二区三区| 国内欧美视频一区二区| 欧美成人video| 韩国精品久久久| 精品裸体舞一区二区三区| 日韩av成人高清| 日韩亚洲欧美一区| 青青草国产精品亚洲专区无| 欧美日本在线一区| 日本不卡一区二区三区| 欧美一区三区二区| 精品在线亚洲视频| 久久嫩草精品久久久精品一| 国产高清不卡一区二区| 亚洲国产成人私人影院tom| 成人av免费在线播放| 一区二区三区四区视频精品免费| 欧美日韩中字一区| 久久精品国内一区二区三区| 欧美成人综合网站| 99久久精品久久久久久清纯| 亚洲精选视频在线| 91精品国产全国免费观看| 久久99精品久久只有精品| 久久理论电影网| 在线观看中文字幕不卡| 麻豆成人91精品二区三区| 日本一区二区三区国色天香 | 亚洲综合999| 亚洲精品在线免费播放|