RE: Loading CFM shlb into a cocoa app
RE: Loading CFM shlb into a cocoa app
- Subject: RE: Loading CFM shlb into a cocoa app
- From: "Phil Barrett" <email@hidden>
- Date: Fri, 6 Jul 2001 08:14:06 +0100
>
> I'm trying to load a CFM shlb (the OS X TWAIN library) using
>
> GetSharedLibrary, which immediately crashes in CCFM_FSGetFileRef().
...
>
I don't know exactly why you're having this problem--to get a real
>
answer you'll probably need to ask on a Carbon list--but the Cocoaish
>
way to load code is through NSBundle or CFBundle. In this case, since
>
you're loading a non-Cocoa library, and in particular since it is CFM,
>
you would use CFBundle. The tricky part might be getting your shlb
>
inside of a bundle, but that shouldn't be impossible...note that
>
CFBundle automatically takes care of the simple cross-ABI issues
>
associated with calling CFM code from a dyld context.
Trouble is, it's not my shlb - it's the Carbon TWAIN library, and I can't
modify it.