Adding devices in setupapi

Maarten Lankhorst m.b.lankhorst at gmail.com
Wed Feb 20 15:07:15 CST 2008


Hi Juan,

2008/2/19, Juan Lang <juan.lang at gmail.com>:
> >  How hard is it to create a stub forwarder dll for setupapi and cfgmgr32?
>
> Not sure what you mean exactly.  cfgmgr32 should forward to setupapi
> already, and I sent a patch that does that for the few stub functions
> that it had.  setupapi's CM_* stubs could be improved, but I don't
> think you'll be able to forward them to any native code to try out:  I
> expect the Windows configuration manager is rather too low level to
> run under Wine.
>
> You'll probably want to create a hacky version of setupapi that
> creates a fake device tree, with a root, USB hub, and iPod device,
> just to see if that makes iTunes happy.

I think it probably does something similar to:
http://www.codeproject.com/KB/system/RemoveDriveByLetter.aspx

Except instead of mapping a drive to usb device, it does it the other
way around.

After looking more into it it really looks like this is the thing it
does. (I need a bunch of hacks for it to work, but alas.) However it
doesn't get me much further since our IOCTL_STORAGE_GET_DEVICE_NUMBER
ioctl is a stub. I would need something that can at least guarantee
uniqueness per volume for it, perhaps a conversion of drive letter to
integer. Now I just need to figure that one out.

Cheers,
Maarten.



More information about the wine-devel mailing list