Legacy Mac OS X Reference Library Apple Developer Connection

Version: 1.0

Posted: 2003-07-17

Build Requirements: N/A

Runtime Requirements: Mac OS X Mac OS X

View Source Code:

Download Sample Code (“CallMachOFramework.zip”, 117.5K)



Description

This sample shows two ways of calling a Mach-O framework from a CFM application on Mac OS X. Both approaches create a CFBundle for the framework and then extract pointers to functions in the framework using CFBundleGetFunctionPointerForName. The simpler approach approach just gets a pointer to the framework function, casts it to appropriate C function pointer type, and calls it. The more complex, but more general, approach uses CFMLateImport technology to bulk import functions from a framework without any messy function pointers. Requirements: Mac OS X

Document Revision History

Date Notes
2003-07-17Shows two ways of calling a Mach-O framework from a CFM application on Mac OS X.
Did this document help you? Yes It's good, but... Not helpful...