Laurent Pinchart a écrit :
the control on "device" handles is done when the high word of the control code is non 0.
as of today (but it's a bit hacky) handles to "device" and VxD:s are
You're refering to both VxDs and WDM (.sys) drivers, right ?
just VxDs
How does the server find the correct low word of the client ID ? The driver I want to implement has a device type of 0xef00 (value passed to IoCreateDevice). I added a field to the VxD table with id set to 0xef00. Does wine, when I call CreateFile( "\\.\MyDevice", ... ), check that table and set the client ID low word to the proper value ?
this is poorly supported at the moment. only a few of the proper \.\ syntax is handled (see files/file.c for the details)
If the 0x20000 bit is set, it's in fact a handle a device. Driver A: through Z: are mapped to 0 to 25 values (in the low word)
Otherwise, it's a handle to the old DOS named devices (with their old IDs too)
I think we should handler those cases in a new device handler (which would just test if the device is a CDROM for now).
all of this needs to be revisited, but this is not a simple task
So, back to DeviceIoControl when the high word of the io control code is 0. We expect device handle in that case (but don't test the 0x20000 bit for error reporting), and then try to check if the device (from it's driver letter) is a CDROM, and if so apply the io control on it. Support of io
control on other types of device (hard disks, storage...) isn't done at the moment.
You mean when the high word is not 0, right ?
yes
I'll add a check for the 0x10000 and 0x20000 bits, and will dispatch the call to either a VxD or a device handler. Is that ok ?Can I use the same VxD list as for (HIWORD(dwIoControlCode) == 0 ) ?
I don't follow you, you only need the VxD list when the hiword is 0 A+