Is there a way to replace or override a function or procedure that is in a commonly used unit within my own unit?
Say, the main program uses unit1 (which I do not have the source to) and unit2 (which I do have the source to). The main program calls function1 and function2. Is there a way within unit2 to force the call of a function1 within it when it is included in the main program along with unit1?
Changing the function call within the main program to a different name is not an option in this case.
My initial thought is maybe to reset procedure pointers (set the procedure pointer in unit1 to the function address in unit2). That's how it works in dynamic addressing, but I'm not sure how it would translate to static functions.
Any ideas?
----------
Measurement is not management.
Say, the main program uses unit1 (which I do not have the source to) and unit2 (which I do have the source to). The main program calls function1 and function2. Is there a way within unit2 to force the call of a function1 within it when it is included in the main program along with unit1?
Changing the function call within the main program to a different name is not an option in this case.
My initial thought is maybe to reset procedure pointers (set the procedure pointer in unit1 to the function address in unit2). That's how it works in dynamic addressing, but I'm not sure how it would translate to static functions.
Any ideas?
----------
Measurement is not management.