OSDynLoad_AcquireContainingModule

Syntax

#include <cafe/os/OSDynLoad.h>

int OSDynLoad_AcquireContainingModule(void *apObject,
				      OSDynLoad_SegmentRestrictionFlags aRestrict,
				      OSDynLoad_ModuleHandle * apRetHandle);

Parameters

apObject Global or static object in some RPL module. that contains apObject. Since apObject has an address, it must already be loaded so this function increases the ref count of the RPL module. apObject can not be a stack based or allocated (e.g. malloc or new) object.
aRestrict Flag to indicate if apObject is in the CODE, DATA, or no restriction.
apRetHandle Pointer to the handle variable to receive the handle to the loaded module This handle value is used in other OSDynLoad function calls. 

Return Values

Returns an OSDYNLOAD_ERR_xxx error code (see OSDynLoad.h).

NULL (or 0) is never a valid handle value.  If the function fails, the return handle value will always be set to 0 unless the pointer to the handle itself is an invalid pointer.

Description

Loads an RPL module that contains an object, returning its handle. A condition being that zero size objects will not be found if they are the last object in a code or data segment.

OSDynLoad_AcquireContainingModule can be called on any core.

Do Not Call From

None.

See Also

OSDynLoad_AddNotifyCallback
OSDynLoad_DelNotifyCallback
OSDynLoad_FindExport
OSDynLoad_FindTag
OSDynLoad_GetAllocator
OSDynLoad_GetLoaderHeapStatistics
OSDynLoad_GetModuleName
OSDynLoad_IsModuleLoaded
OSDynLoad_Release
OSDynLoad_SetAllocator
makerpl

Revision History

2013/11/01 Added OSDynLoad_IsModuleLoaded.
2013/05/08 Automated cleanup pass.
2013/02/20 Initial version.


CONFIDENTIAL