Joke Collection Website - Public benefit messages - The method of finding the address of process module with easy language.
The method of finding the address of process module with easy language.
Version 2
. The subroutine GetModule, integer type,, returns the module address of the specified module in the specified process.
. Parameter ProcessID, integer type.
Parameter module name, text type
. Local variable hObject, integer.
. Local variable ModuleEntry32, module address _
. Local variable module, module address _
Clear the array (module)
Hoobject = API _ createtoolhelp32 snapshot (8, processid)' If the id is 0, it means the current process.
ModuleEntry32。 Structure size = 1024.
. If true (find the first 32-bit module _(ho object, ModuleEntry32))
. Cyclic judgment takes precedence ()
. If true (converted to lowercase (converted to text (ModuleEntry32. Module name)) = lowercase (module name))
API_CloseHandle (hObject)
Return (ModuleEntry32。 Module handle)
If it's over.
Loop judgment tail (find the next 32-bit module _(ho object, ModuleEntry32))
If it's over.
API_CloseHandle (hObject)
Debugging output (module)
Return (0)
You can get it by calling "GetModule" directly after pasting.
- Related articles
- Where can I find a personalized SMS tone to download?
- The content of enterprise WeChat short message cannot be edited.
- The deeds of advanced figures in Linyi
- How to set the font size of Xiaomi 10?
- What should I do if I forget the password in the memo with password?
- How to edit and send the Mid-Autumn Festival holiday speech to customers when working in a beauty salon?
- What happened when the delivery platform informed me that the reservation order had been submitted?
- True and False SMS of Huzhou Xinnao Provident Fund
- It's very hot outside. How can I send a warm word to my girlfriend?
- How to lengthen a photo to make wallpaper?