--- Saulius Krasuckas saulius2@ar.fi.lt wrote:
- On Thu, 17 Nov 2005, Damjan Jovanovic wrote:
--- Saulius Krasuckas saulius2@ar.fi.lt wrote:
- On Mon, 14 Nov 2005, Maris Paupe wrote:
I have a USB device which doesn' t have a
driver
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
that
does what USBSCAN.SYS does in Windows. Look for
mails
about a month back with STI and USB in the topics.
Hehe, Damjan, you are mentioned on my wiki page too. :-P
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
wine's
proxy.
What is this "proxy"?
I think Maris will explain.
Last time I checked it was practically impossible
to
use libusb from within wine; wine's implementation
of
ReadFile(), WriteFile() and DeviceIoControl() work with UNIX fd's only, and libusb wants its own
handles.
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 cleanly.
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?
__________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com