Date: May 18, 2005 09:41:42 PDT
Subject: Re: Communication with already loaded kext
Anshul,
The ATIRadeon8500.kext does not have this property so ATI does not intend to have their kext used as a library. So it is not possible to use this kext as a dependency or create a subclass of any class it provides.
You can write a kext that matches on instances of this class (use the property IOProviderClass). When it loads, it will have an instance of ATIRadeon8500 as it's provider, and you can call any of the entry points that are defined by the generic superclass of this driver, but you can't call methods that are added by their class (since you can't link against their kext can get at their class's vtable). I believe that both ::allocate_Texture() and ::alloc_and_load_texture() are defined by their class and not inherited, so you will probably not be able to get at them.
- Dean
On May 18, 2005, at 02:56, Anshul Makkar wrote:
Hello,
I am developing a filter graphics kext that will call the original graphics kext's functions.
Is it possible to call a function of already loaded graphics kext( eg call alloc_texture function of ATIRadeon8500.kext ) from my filter kext .
I dont have the source code for ATIRadeon8500 so no header file is availablle with us , only information that is availabe the symbols (eg ATIRadeon8500::allocate_Texture(), ATIRadeon8500::alloc_and_load_texture) .
Now I want to call these functions from my graphics kext .
What I am trying to do is :
In Dependencies I have given ATIRadeon8500
I am inheriting my class from ATIRadeon8500 which is failing , and that should be correct as how my application will find the class ATIRadeon8500 . eg class com_Samsung_driver_Magic_Pivot : public ATIRadeon8500 ->error : class ATIRadeon8500 undeclared .
The basic purpose is to inherit my class from ATIRadeon8500 , so as to call the functions of ATIRadeon from my own kext .
In the example source code IOKitWithLibrary , they are preparing their own Library kext and I dont have that priviledge here.
Is there a way to achive it.
Thanking You