VirtualBox

Changeset 36941 in vbox for trunk/include


Ignore:
Timestamp:
May 3, 2011 2:56:08 PM (14 years ago)
Author:
vboxsync
Message:

usb rework

Location:
trunk/include/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxDrvCfg-win.h

    r36536 r36941  
    5252VBOXDRVCFG_DECL(void) VBoxDrvCfgPanicSet(PFNVBOXDRVCFG_PANIC pfnPanic, void *pvPanic);
    5353
     54/* Driver package API*/
    5455VBOXDRVCFG_DECL(HRESULT) VBoxDrvCfgInfInstall(IN LPCWSTR lpszInfPath);
    5556VBOXDRVCFG_DECL(HRESULT) VBoxDrvCfgInfUninstall(IN LPCWSTR lpszInfPath, IN DWORD fFlags);
     
    5758VBOXDRVCFG_DECL(HRESULT) VBoxDrvCfgInfUninstallAllF(IN LPCWSTR lpszClassName, IN LPCWSTR lpszPnPId, IN DWORD fFlags);
    5859
     60/* Service API */
     61VBOXDRVCFG_DECL(HRESULT) VBoxDrvCfgSvcStart(LPCWSTR lpszSvcName);
     62
    5963RT_C_DECLS_END
    6064
  • trunk/include/VBox/usblib-win.h

    r34306 r36941  
    4242#define USBFLT_SYMBOLIC_NAME_STRING      L"\\DosDevices\\VBoxUSBFlt"
    4343
    44 #define USBMON_SERVICE_NAME              "VBoxUSBMon"
     44#define USBMON_SERVICE_NAME_W              L"VBoxUSBMon"
    4545#define USBMON_DEVICE_NAME               "\\\\.\\VBoxUSBMon"
    4646#define USBMON_DEVICE_NAME_NT            L"\\Device\\VBoxUSBMon"
     
    7474#define USBFLT_MINOR_VERSION              3
    7575
    76 #define USBMON_MAJOR_VERSION              1
    77 #define USBMON_MINOR_VERSION              1
    78 
    79 #define USBDRV_MAJOR_VERSION              3
    80 #define USBDRV_MINOR_VERSION              1
     76#define USBMON_MAJOR_VERSION              4
     77#define USBMON_MINOR_VERSION              0
     78
     79#define USBDRV_MAJOR_VERSION              4
     80#define USBDRV_MINOR_VERSION              0
    8181
    8282#define SUPUSB_IOCTL_TEST                 CTL_CODE(FILE_DEVICE_UNKNOWN, 0x601, METHOD_BUFFERED, FILE_WRITE_ACCESS)
     
    103103#define SUPUSBFLT_IOCTL_CAPTURE_DEVICE    CTL_CODE(FILE_DEVICE_UNKNOWN, 0x613, METHOD_BUFFERED, FILE_WRITE_ACCESS)
    104104#define SUPUSBFLT_IOCTL_RELEASE_DEVICE    CTL_CODE(FILE_DEVICE_UNKNOWN, 0x614, METHOD_BUFFERED, FILE_WRITE_ACCESS)
     105#define SUPUSBFLT_IOCTL_RUN_FILTERS       CTL_CODE(FILE_DEVICE_UNKNOWN, 0x615, METHOD_BUFFERED, FILE_WRITE_ACCESS)
     106#define SUPUSBFLT_IOCTL_SET_NOTIFY_EVENT  CTL_CODE(FILE_DEVICE_UNKNOWN, 0x616, METHOD_BUFFERED, FILE_WRITE_ACCESS)
     107#define SUPUSBFLT_IOCTL_GET_DEVICE        CTL_CODE(FILE_DEVICE_UNKNOWN, 0x617, METHOD_BUFFERED, FILE_WRITE_ACCESS)
    105108
    106109#pragma pack(4)
     
    109112#define MAX_USB_SERIAL_STRING           64
    110113
    111 typedef struct
    112 {
     114/* a user-mode handle that could be used for retriving device information
     115 * from the monitor driver */
     116typedef void* HVBOXUSBDEVUSR;
     117
     118typedef struct
     119{
     120    HVBOXUSBDEVUSR  hDevice;
    113121    uint16_t        vid, did, rev;
    114122    char            serial_hash[MAX_USB_SERIAL_STRING];
     
    117125    uint8_t         fHiSpeed;
    118126} USBSUP_GETDEV, *PUSBSUP_GETDEV;
     127
     128typedef struct
     129{
     130    USBDEVICESTATE enmState;
     131} USBSUP_GETDEV_MON, *PUSBSUP_GETDEV_MON;
    119132
    120133typedef struct
     
    231244} USBSUP_URB, *PUSBSUP_URB;
    232245
     246typedef struct
     247{
     248    union
     249    {
     250        /* in: event handle */
     251        void* hEvent;
     252        /* out: result */
     253        int rc;
     254    } u;
     255} USBSUP_SET_NOTIFY_EVENT, *PUSBSUP_SET_NOTIFY_EVENT;
     256
     257typedef struct
     258{
     259    uint16_t        usVendorId;
     260    uint16_t        usProductId;
     261    uint16_t        usRevision;
     262    uint16_t        usAlignment;
     263    char            DrvKeyName[512];
     264} USBSUP_DEVID, *PUSBSUP_DEVID;
     265
     266typedef struct
     267{
     268        USBSUP_DEVID DevId;
     269        char szName[512];
     270        USBDEVICESTATE enmState;
     271    bool fHiSpeed;
     272} USBSUP_DEVINFO, *PUSBSUP_DEVINFO;
     273
     274typedef struct
     275{
     276    int rc;
     277    uint32_t cDevices;
     278    USBSUP_DEVINFO aDevices[1];
     279} USBSUP_GET_DEVICES, *PUSBSUP_GET_DEVICES;
     280
    233281#pragma pack()                          /* paranoia */
    234282
     
    249297 * @param pcbNumDevices     Number of USB devices in the list
    250298 */
    251 USBLIB_DECL(int) USBLibGetDevices(PUSBDEVICE *ppDevices,  uint32_t *pcbNumDevices);
    252 
    253 /**
    254  * Check for USB device arrivals or removals
    255  *
    256  * @returns boolean
    257  */
    258 USBLIB_DECL(bool) USBLibHasPendingDeviceChanges(void);
    259 
    260 /**
    261  * Capture specified USB device
    262  *
    263  * @returns VBox status code
    264  * @param usVendorId        Vendor id
    265  * @param usProductId       Product id
    266  * @param usRevision        Revision
    267  */
    268 USBLIB_DECL(int) USBLibCaptureDevice(uint16_t usVendorId, uint16_t usProductId, uint16_t usRevision);
    269 
    270 /**
    271  * Release specified USB device to the host.
    272  *
    273  * @returns VBox status code
    274  * @param usVendorId        Vendor id
    275  * @param usProductId       Product id
    276  * @param usRevision        Revision
    277  */
    278 USBLIB_DECL(int) USBLibReleaseDevice(uint16_t usVendorId, uint16_t usProductId, uint16_t usRevision);
     299USBLIB_DECL(int) USBLibGetDevices(PUSBDEVICE *ppDevices, uint32_t *pcbNumDevices);
     300
     301USBLIB_DECL(int) USBLibWaitChange(RTMSINTERVAL cMillies);
     302
     303USBLIB_DECL(int) USBLibInterruptWaitChange();
     304
     305USBLIB_DECL(int) USBLibRunFilters();
    279306
    280307/** @} */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette