Hi all,
I'm trying to add the ipod detection from crossover wine to winehq. However it seems to be not compatibel due to changes to setupapi in the last 3 years.
Basically what I want to do is add an usb mass storage device with the correct device path and register it with setupapi. Composing the string is easy but I'm not 100% sure what the locations are. The code seems a bit vague in that aspect. The snippet iTunes uses for detection is shown below:
SetupDiGetClassDevsExW {53f56307-b6bf-11d0-94f2-00a0c91efb8b} (null) (nil) 0x00000012 (nil) (null) (nil) SetupDiEnumDeviceInterfaces 0x136638, (nil), {53f56307-b6bf-11d0-94f2-00a0c91efb8b}, 0, 0x7aa2140c
How do I get my device listed in SetupDiEnumDeviceInterfaces there so iTunes can pick it up?
Cheers, Maarten.
On Feb 19, 2008 5:48 PM, Maarten Lankhorst m.b.lankhorst@gmail.com wrote:
Hi all,
I'm trying to add the ipod detection from crossover wine to winehq. However it seems to be not compatibel due to changes to setupapi in the last 3 years.
Basically what I want to do is add an usb mass storage device with the correct device path and register it with setupapi. Composing the string is easy but I'm not 100% sure what the locations are. The code seems a bit vague in that aspect. The snippet iTunes uses for detection is shown below:
SetupDiGetClassDevsExW {53f56307-b6bf-11d0-94f2-00a0c91efb8b} (null) (nil) 0x00000012 (nil) (null) (nil) SetupDiEnumDeviceInterfaces 0x136638, (nil), {53f56307-b6bf-11d0-94f2-00a0c91efb8b}, 0, 0x7aa2140c
How do I get my device listed in SetupDiEnumDeviceInterfaces there so iTunes can pick it up?
Call the function in windows and check which registry keys are queried using regmon. See the post I just sent to your last question.
No worries on the double post, you ask a slightly different question here:
I'm trying to add the ipod detection from crossover wine to winehq. However it seems to be not compatibel due to changes to setupapi in the last 3 years.
The crossover Wine tree was written for version 4.x of iTunes, I believe. Using it directly in winehq is not likely to be a help, because that version of iTunes is quite old, and the method newer versions of iTunes uses to find and talk to iPods is different. (Remember also Rob's comment about iTunes changing every 3-6 months...)
The code in winehq is, I believe, correct as far as which registry keys it queries. I wrote it with iTunes in mind, at any rate. What you want to figure out is not how to extend setupapi's SetupDi functions. Instead, you want to figure out how to enumerate the iPod, and call the SetupDi functions to have them create the appropriate registry keys.
Assuming the version of iTunes you're testing with behaves similarly to the one I tested for bug 9649, once you've got the right registry keys set, you'll get crashes due to the missing CM_* functions in cfgmgr32/setupapi. Or, maybe the version you're playing with is different all over again... --Juan