gnustep-dev
[Top][All Lists]
Advanced

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

Re: Windows, DLLs and NSBundle


From: Adam Fedor
Subject: Re: Windows, DLLs and NSBundle
Date: Thu, 04 Jan 2001 10:37:41 -0700

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.



reply via email to

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