I am working on getting a PowerPC app that uses USB to run on an Intel Mac. The USB code is in a universal binary library. We don't want to make a universal binary of the app, because it uses PowerPlant. The library works when run natively; i.e., when the app is universal, too. But it fails in our PPC app when run on Intel under Rosetta. It connects, finds a configuration, but fails to find any interfaces. It's hard to debug, because the Xcode debugger doesn't work under Rosetta.
One thing I've done is to build the sample Apple project USBSimple Example. To my surprise, this also fails in much the same way on the Intel Mac when run under Rosetta. Has anyone else seen this?
When I added the byte-swapping macro USBToHostLong to the following line
while ( (usbInterfaceRef = IOIteratorNext( USBToHostLong( iterator ) )))
it worked. At least that part. Do I need to add a lot of these macros to my code? Any advice would be appreciated.
================================= Ray Swartz X-Rite, Inc.
|