On 2022-01-26 10:09, Stefan Dösinger wrote:
One other option to investigate: Write a small Windows/Wine device driver that registers the character device and forwards it to the Unix device node. If you get that working you shouldn't need to modify wineserver in a very device specific way. In theory the API is also stable (Wine just implements the Windows driver API), so the Windows device driver can live out of tree.
See dlls/*.sys for some examples of existing device drivers; In particular mountmgr.sys, wineusb.sys are examples of drivers that talk to both the Windows and Unix side.
Okay, I'm going to try this. So far I have managed to compile an empty hantek.sys.so (copied and renamed tdi.sys).
danman@silverhorse:~/storage/Projects/hantek-usb/wine/dlls/hantek.sys$ ls -lah total 256K drwxrwxr-x 2 danman danman 4,0K jan 26 23:33 . drwxrwxr-x 864 danman danman 36K jan 26 23:21 .. -rw-rw-r-- 1 danman danman 118 jan 26 23:33 .gitignore -rw-rw-r-- 1 danman danman 1,1K jan 26 23:33 hantek.sys.fake -rwxrwxr-x 1 danman danman 126K jan 26 23:33 hantek.sys.so -rw-rw-r-- 1 danman danman 1,7K jan 26 23:21 hantek.sys.spec -rw-rw-r-- 1 danman danman 1,2K jan 26 23:22 main.c -rw-rw-r-- 1 danman danman 52K jan 26 23:33 main.o -rw-rw-r-- 1 danman danman 11K jan 26 23:33 Makefile -rw-rw-r-- 1 danman danman 95 jan 26 23:22 Makefile.in
How do I load it in wine now?