Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with hooking.cpp file not working #3

Open
Riadrai09 opened this issue Jun 30, 2024 · 0 comments
Open

Problem with hooking.cpp file not working #3

Riadrai09 opened this issue Jun 30, 2024 · 0 comments

Comments

@Riadrai09
Copy link

Riadrai09 commented Jun 30, 2024

Hey , I am a beginner and I found this interesting project about Windows API hooking , exatly in this path 2021-11-30-basic-hooking-1
-At the first, everything was functioning properly, and I was receiving the three message boxes.

  • However, The main problem comes within the file hooking.cpp 2021-11-30-basic-hooking-1\hooking.cpp. Although the first/originql message box appears but after that the program ends without showing the second/hooked box.
    So I tried some things like but it doesn't work :
  1. I did put rOffset as a regular integer : DWORD rOffset; rOffset = dst-src;
  2. I replaced memcpy() with CopyMemory().
  3. I changed the patch type to BYTE : BYTE patch[5] = {0};
  4. I attempted to change the type of both patch to void * and rOffset to const void*. However, I encountered errors due to the fact that the patch will receive bytes.
  5. I don't know if the problem is with the number of bytes that need to be adjusted from 5 to a higher value.
@Riadrai09 Riadrai09 changed the title Problem with hooking2.cpp file not working Problem with hooking.cpp file not working Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant