Override/redirect a function call from a dll

F

Firas

I have a dll but not source code of it. I would need to replace the file
open calls from this dll with a modified file open function of my own. Is it
possible to override or redirect these calls to make the dll call my own
function instead of the original one?

Thanks
//Firas
 
V

Victor Bazarov

Firas said:
I have a dll but not source code of it. I would need to replace the file
open calls from this dll with a modified file open function of my own. Is it
possible to override or redirect these calls to make the dll call my own
function instead of the original one?

If you expect your "overriding" function to be called from the DLL's own
functions (where it usually calls the DLL's own file open routine), you
won't be able to do that. A DLL is already linked, every symbol needed by
it has been resolved, and any symbol that comes from the same library will
be bound statically.

Also, this is not a language problem. Consider asking in a newsgroup in
which DLLs are on topic, like comp.os.ms-windows.programmer or in a forum
for your compiler.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top