Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Confusion over drivers vs. driver interfaces



--- Timothy Desrochers <email@hidden> wrote:
> I build my user-land "driver" as a Mach-O loadable
> bundle. It is not
> used by third-parties, but is quite handy for
> several different apps and
> plug-ins we have developed that use USB. We find the
> bundle through a
> "registry" entry (an Application Support preference
> file) that is set up
> by our installer. Our apps know where to look. The
> loadable bundle
> approach allowed us to use the same API as our
> classic driver shim. The
> result was a carbon app that could access our USB
> devices on 8, 9, and X
> using the same API by simply loading the
> OS-applicable Shared Lib or
> Bundle.
> 

That' funny. I took an _IDENTICAL_ approach for my
project that required OS 9 and OS X drivers, i.e a
Carbon app that talks to either an OS 9 or OS X shim
through the same interface, which in turn talk to
either an OS 9 or OS X driver. The downside here is
that there isn't a standard way to locate a user-land
driver. The key point is in your statement "Our apps
know where to look".

> I use a background app for auto-launching software
> on a USB plug. It was
> a royal pain mainly because I needed three different
> builds for OS 8 (an
> appe that can't check for multiple users) OS 9 (an
> appe that must check
> for multiple users and delay auto-launch until
> login) and OS X (an APPL
> that only gets launched on login).
> The later is especially worrisome in that it depends
> on an undocumented
> API and a request-only bit of sample code.

OS 9 wasn't a problem for me. All drivers in OS 9 are
system extensions and get loaded automatically when a
matching device is attached. I just needed to do a
SetConfiguration, not launch an app, so just getting
loaded and having my initialization entry point
invoked was enough for me. On OS X, I too had to write
a background app that does this using the user-mode
driver that I wrote.

> 
> I disagree, relative to my experience doing the same
> vendor-specific
> driver on classic.
> 

I don't think it's really fair to compare OS X
user-land drivers to classic drivers because they are
really two different operating systems. The classic
USB DDK is a lower-level API, and as such necessitates
writing more code. Although I will say that the USB
DDK for Classic seems more mature (more examples,
better documentation). My main point was that there
seems like there are a couple of missing facilites in
the OS X user-land API for doing routine things, such
as having a common/standard way to package, install,
locate and launch a user-land driver without involving
a specific application. Maybe I'm just strange in
thinking that things should be made easy for
developers. ;-) It's interesting that different
developers are rolling their own nearly-identical
solutions to the same problems...

-Steve
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.

References: 
 >RE: Confusion over drivers vs. driver interfaces (From: "Timothy Desrochers" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.