usb driver proxy
dj015 at yahoo.com
Thu Nov 17 07:16:07 CST 2005
--- Saulius Krasuckas <saulius2 at ar.fi.lt> wrote:
> * On Thu, 17 Nov 2005, Damjan Jovanovic wrote:
> > --- Saulius Krasuckas <saulius2 at ar.fi.lt> wrote:
> > > * On Mon, 14 Nov 2005, Maris Paupe wrote:
> > > >
> > > > I have a USB device which doesn' t have a
> > > > in linux, I wrote it as kernel module,
> > I also have a USB scanner that doesn't work under
> > Linux, and my solution involved a kernel module
> > does what USBSCAN.SYS does in Windows. Look for
> > about a month back with STI and USB in the topics.
> Hehe, Damjan, you are mentioned on my wiki page too.
Didn't think I was that famous :-)
> BTW, won't start editing page about your own
> interests about Wine on the
> Wiki too?
I think I will.
> > > > Right now I am planning to rewite this driver
> > > > using libusb and implement everything in
> > > > proxy.
> > What is this "proxy"?
> I think Maris will explain.
> > Last time I checked it was practically impossible
> > use libusb from within wine; wine's implementation
> > ReadFile(), WriteFile() and DeviceIoControl() work
> > with UNIX fd's only, and libusb wants its own
> > I had to make wine's fd, my kernel module's device
> > file.
> Wait, but there are DLLs (mscms, winsock) in wine
> which uses direct calls
> to unix libs. Can't you do the same with libusb in
> your some wine module?
winsock uses ints, not HANDLEs, so it avoids the
problem entirely. I'll check out mscms.
With HANDLEs, a kernel module fits in naturally,
because when NtReadFile() does read(), the kernel
module gets its read function called, etc. It fits in
easily into the wine architecture. libusb is a better
solution (it works on several OSes, including Windows
itself, check out libusb-win32.sourceforge.net :-),
but I have yet to see a way to integrate it into wine
> Maybe some code must be put into wineserver, but
> still I don't see reasons
> to not use libusb directly. You just have to find a
> right place in Wine
> tree for it. No?
I asked about this a while back, and I was told that
typed handles, and implementation of ReadFile(),
WriteFile() etc. with function pointers specific to
each handle, were done once and taken out of wine. It
seems to me nobody wants them back?
> > > [*] http://wiki.winehq.org/SauliusKrasuckas
Yahoo! FareChase: Search multiple travel sites in one click.
More information about the wine-devel