Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page >

NSCreateObjectFileImageFromMemory


Creates an image reference for a Mach-O file currently in memory.

NSObjectFileImageReturnCode NSCreateObjectFileImageFromFile(
   void* address,
   unsigned long size,
   NSObjectFileImage* objectFileImage);

Parameter Descriptions
address
A pointer to the memory block containing the Mach-O file contents.

size
The size of the memory block, in bytes.

objectFileImage
On output, a pointer to an NSObjectFileImage opaque data structure.

function result
A result code (see below).

Discussion

Given a pointer to a Mach-O file in memory, this function creates and returns an NSObjectFileImage reference. The current implementation works only with bundles, so you must build the Mach-O executable file using the -bundle linker option.

Availability

Available in Mac OS X version 10.3 and later.

Result Codes

NSObjectFileImageSuccess
The operation was completed successfully.

NSObjectFileImageFailure
The operation was not successfully completed. When this result code is returned, an error message is printed to the standard error stream.

NSObjectFileImageInappropriateFile
The Mach-O file in memory is not of a type this function can operate upon.

NSObjectFileImageArch
The specified Mach-O file is for a different CPU architecture.

NSObjectFileImageFormat
The memory block does not appear to point to a Mach-O file.

NSObjectFileImageAccess
The access permissions for the specified file do not permit the creation of the image.


< Previous PageNext Page >


Last updated: 2003-08-07

Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice