Hello,
I sent patch "Add support of WDM drivers for USB devices." in October and received such reply from Alexandre Julliard:
Your design needs a lot more thought. You can't add all these Wine-specific modules, or make winedevice special-case usb devices, or poll the server for the add_device request like you do. All this needs to be properly integrated in the existing infrastructure.
I`d like to ask about better way of modifying patches which add USB device drivers support before doing something.
Wineusb and wineusbhub can be moved to usbhub.sys. This driver creates a device which is used as second argument for AddDevice on Windows XP. So no wine-specific modules will be added.
Using wineserver to call AddDevice can be avoided if move code which loads device drivers and code which enumerates devices and call AddDevice to one process. This can be made if use one winedevice process for all drivers. This will allow every driver to use IRP, DEVICE_OBJECTs and other structures created by other driver and will help to implement such functions as IoGetDeviceObjectPointer. Can I do so? Or there are some reasons which do not allow?
Thanks, Alexander