Home > Software engineering >  Questions about the DLL injection!
Questions about the DLL injection!

Time:10-13

Questions about the DLL injection!

Use the SetWindowsHookEx thread for the global injection
But I don't find any process into success

is a function of I call wrong, or other problems? O great god answer

The following is the code

 LRESULT CALLBACK CBTProc (int nCode, WPARAM WPARAM, LPARAM LPARAM) {
Return CallNextHookEx (m_hook, nCode wParam, lParam);
}

GAME_API void SetHook ()
{
UpdataToken ();
M_hook=SetWindowsHookEx (WH_CBT CBTProc, GetModuleHandle (L "Game. DLL"), 0).
}



CodePudding user response:

Where're the BBS Daniel ah ~ ~ ~ ~ ~

CodePudding user response:

Look at what mhook value is 1, debugging
2, call getlasterror see return values

CodePudding user response:

refer to the second floor jacksonfan response:
1, debugging and see what mhook value is
2, call getlasterror see return value


I found no running under the function of breakpoint to this function below

Through the information dialog for the button events to invoke the text can show normal
Void CD3DtoushiDlg: : OnBnClickedOk ()
{
//TODO: add the control notification handler code
LPCTSTR l=show ();
MessageBox (l);
SetHook ();
}

GAME_API void SetHook ()
{
M_hook=SetWindowsHookEx (WH_CBT CBTProc, GetModuleHandle (L "Game. DLL"), 0).
}

GAME_API LPCTSTR show () {
Return L "show success";
}

CodePudding user response:

Mhook empty
Getlasterror 0

CodePudding user response:

reference 4 floor qq_35795444 response:
mhook empty
Getlasterror 0

Well, it seems that is static call, h. lib. DLL are configured properly

CodePudding user response:

GetModuleHandle (L "Game. DLL) you hadn't thought of that is likely to fail here?

CodePudding user response:

Reference WinAPIOverride32 source code related fragments,

CodePudding user response:

refer to 6th floor xiaohuh421 response:
GetModuleHandle (L "Game. DLL) you hadn't thought of that is likely to fail here?


I have made with the keyboard hooks into then pop-up message box
Then I found that can be injected into the
But I used PChunter and PowerTools tool
Under the process but can't find my injection module

Excuse me this is the reason why I am a Windows 7 64 system

CodePudding user response:

reference 5 floor jacksonfan reply:
Quote: refer to 4th floor qq_35795444 response:

Mhook empty
Getlasterror 0

Well, it seems that is static call, h. lib. DLL are configured properly


These things are true
  • Related