kctan100
asked on
DLL forwarding
Does anybody has an idea on how to redirect a call to a function in a dll to your own dll ?
Thank you!
Thank you!
ASKER
I there is a misunderstanding on the question. In fact, I'm trying to intercept a call to a function in a specified dll.
Example :
A.Dll exports function A.
B.exe calls A.
Instead of calling A, I will force B.exe to call my version of A in another DLL.
Example :
A.Dll exports function A.
B.exe calls A.
Instead of calling A, I will force B.exe to call my version of A in another DLL.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
const char szcScpWDLLName [] = "MYDLL.DLL";
const char szcFuncName [] = "MyFunction";
TModule *DLLModule;
DLLModule = new TModule ( DLLName, TRUE);
int FAR PASCAL ( *Fun )( char * );
( FARPROC ) Fun = DLLModule ->
GetProcAddress ( szcFuncName );
if ( Fun )
Fun ( ....);
It is for OWL, in pure Windows you
must use LoafLibrary function(instead of TModule)
Best Regards, Alex