[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows, DLLs and NSBundle

From: Helge Hess
Subject: Re: Windows, DLLs and NSBundle
Date: Thu, 04 Jan 2001 18:51:59 +0100


If you use NSBundle you should even be able to get a NSBundleDidLoad
Notification which includes the loaded classes and categories. At least
this works with libFoundation (which overrides the callback during
bundle loading) and MacOSX.


Adam Fedor wrote:
> Michael Scheibler wrote:
> >
> > Ok, I was (finally!) able to load a DLL using NSBundle. The ObjC-class
> > inside this DLL is automatically initialized by its load-method. Now it
> > would be nice to know what classes are inside.
> > I found a callback function in objc-load.m (objc_load_callback) and
> > found following lines in objc-api.h of gcc:
> >
> > /*
> > ** This is a hook which is called by __objc_exec_class every time a
> > class
> > ** or a category is loaded into the runtime.  This may e.g. help a
> > ** dynamic loader determine the classes that have been loaded when
> > ** an object file is dynamically linked in.
> > */
> > extern void (*_objc_load_callback)(Class class, Category* category);
> >
> > Unfortunately this function is never invoked. Can you tell me why, or
> > where I can change the code for it?
> >
> It should be invoked. objc_load_module should set _objc_load_callback to
> the local function objc_load_callback. Anytime the Objective-C rurntime
> loads a module containing classes, it should call this function for each
> class and category. You might have to trace the program from
> objc_load_module to make sure the callback is really getting setup
> correctly.

SKYRIX Software AG -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]