I need a function[SOLVED]

Posts 1–12 of 12 · Page 1 of 1
I need a function[SOLVED]
Can anybody give me the DetourRemove() function in [code], not a file.

That would be nice.
Sorry Sealionone I don't have any code for you..

But I must inform you that to remove the detour the function would require the original 5 bytes ( a jump is 5 bytes ) that were there before the detour was placed. I don't see how that's possible..

My advice would to just copy the first 5 bytes where you're about to detour, then place the detour. Then you could just make your own DetourRemove().

Yeah.. sorry, I got nothing for you..
Quote Originally Posted by Void View Post
Sorry Sealionone I don't have any code for you..

But I must inform you that to remove the detour the function would require the original 5 bytes ( a jump is 5 bytes ) that were there before the detour was placed. I don't see how that's possible..

My advice would to just copy the first 5 bytes where you're about to detour, then place the detour. Then you could just make your own DetourRemove().

Yeah.. sorry, I got nothing for you..
Yeah Detours 1.5 doesn't work for me for some reason. And I'm not used to Detours 2.1...

Thanks for the advice.
What's not working about detours 1.5?
Just place the lib in msvc/lib folder and the header in msvc/include, then include detours.h nd it shold work just fine >.>
Quote Originally Posted by Hell_Demon View Post
What's not working about detours 1.5?
Just place the lib in msvc/lib folder and the header in msvc/include, then include detours.h nd it shold work just fine >.>
It keeps saying it doesn't know what DetourRemove() is... I don't know why, I did include them in the project.
Quote Originally Posted by Crash View Post
It keeps saying it doesn't know what DetourRemove() is... I don't know why, I did include them in the project.
Try writing out the actual function in the main cpp file. C&P it if you need to
Quote Originally Posted by mwb1234 View Post
Try writing out the actual function in the main cpp file. C&P it if you need to
That's the thing I was asking for.

I couldn't find it on Google and it isn't in the .h file.
Quote Originally Posted by Crash View Post
That's the thing I was asking for.

I couldn't find it on Google and it isn't in the .h file.
Oh, well try searching the sub directories of the header file. Such as the header file might say #include "BlahBlah.h"
Look in blahBlah.h then
Quote Originally Posted by mwb1234 View Post
Oh, well try searching the sub directories of the header file. Such as the header file might say #include "BlahBlah.h"
Look in blahBlah.h then
The functions are in the libraries, you can't view the code. The includes are just the function definitions.

I was just debugging a detour, it writes over the first 5 bytes like I said. It shouldn't be that hard to write your own function. I'll give it a shot after dinner.
Quote Originally Posted by Void View Post
The functions are in the libraries, you can't view the code. The includes are just the function definitions.

I was just debugging a detour, it writes over the first 5 bytes like I said. It shouldn't be that hard to write your own function. I'll give it a shot after dinner.
Oh I didn't realize that ... Thanks
Try adding the following below your includes(but before you make calls to the functions):

Code:
#pragma comment(lib, "detours.lib")
Replace detours.lib with the actual filename, and make sure to add the .lib to your projects linker input(right click project -> properties -> linker -> input -> first text box)
Yeah, I did that but it still didn't work. I figured out the problem though, for the include directories I put it on my desktop where the files were which didn't work for some reason, but putting them in the VS folder does work.
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us