Jump to content

Detecting if DLL is in memory.


Shyke
 Share

Recommended Posts

  • Moderators

Local $nHnd = 0
While $hMHnd  = 0
    $hMHnd  = _IsModuleLoaded(@SystemDir & '\User32.dll')
    Sleep(100)
WEnd

MsgBox(64, 'Info', 'Found:' & @CR & $hMHnd)

Func _IsModuleLoaded($sModule)
    Local $aGetModuleHandleAPI = DllCall('Kernel32.dll', 'ptr', 'GetModuleHandle', 'str', $sModule)
    If IsArray($aGetModuleHandleAPI) And $aGetModuleHandleAPI[0] <> 0 Then Return $aGetModuleHandleAPI[0]
    Return SetError(1,0,0)
EndFunc

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Alright, so apparently it only finds the DLL in memory if the DLL I'm trying to detect has been injected into the program. Suggestions?

O.K., so what is it you are trying to do?

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Create a program to detect if someone is running WPE Pro to make sure they arn't cheating on a game. WPE Pro injects it's DLL into the target, I want to make it so that if it tries, it kills the process of it's target so it can't effect it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...