Error calling original Function

May 24, 2013 at 1:58 PM
Edited May 24, 2013 at 2:08 PM

I made a very simple program called test.exe this program imports a DLL and executes a function passing 2 strings and getting one in return.

Well i hooked the Teste.exe and I managed to intercept the two input strings.

But how i can get the return string?
May 27, 2013 at 1:11 PM
Are you able to post some of your source code? It's hard to know exactly what problem you're having without code to look at.

The problem I think you're having is that you are not calling the original function from your injected code. You have intercepted it - and your delegate function is running instead of the original function. Which means your delegate function needs to return something back to the target application. Unless you want to change the functionality of the target application, then you should probably call the function yourself, store the result, and make that the return value of your delegate function.

Does that make sense?