Frage

Good morning,

Is it possible, using dyld interposition feature, to interpose this kind of C function ? 

typedef struct aStructure {
    IOReturn (*aCfunction)(void *self, UInt32 integer); // self is a 
                                                        // pointer to aStructure
} aStructure;

How the function is called:

aStructure **myStruct = ......;

(*myStruct)->aCfunction(myStruct, 1);
War es hilfreich?

Lösung

Probably only possible if you can figure out where the actual function is, and interpose that.

There will be code to initialize the function pointer field in the structure to point at an actual function and I guess that's where you need to change things.

Also, you calling line is slighly off, it needs to be

(*myStruct)->aCfunction(*myStruct, 1);
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top