Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 04:34

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C# - REQUEST] Process ID + DLL ??

Discussion on [C# - REQUEST] Process ID + DLL ?? within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2006
Posts: 170
Received Thanks: 61
[C# - REQUEST] Process ID + DLL ??

Hey guys,
i got following Problem:
I want to write a bot but the Memory values are in a dll of the process (game.dll) now i just dont know how to get the base of the dll. I got an AutoID example:

PHP Code:
Func MemReadDLLEnemyLevel($offset)
    
$StaticOffset Dec($offset)
    Global 
$pid
    
Global $CUROffset[1]
    
$CUROffset[0] = 0
    $baseADDR 
_MemoryModuleGetBaseAddress($pid"Game.dll")
    
$finalADDR "0x" Hex($baseADDR $StaticOffset)
    
$MemTest _MemoryRead($finaladdr,$openmem)
    
$MemTest _memoryread(   $MemTest0x01C4,$openmem)
    
$MemTest _memoryread(   $MemTest 0x0032$openmem,"byte" )
    Return 
$MemTest
EndFunc 
_MemoryModuleGetBaseAddress FUNC:
PHP Code:

Func _MemoryModuleGetBaseAddress
($iPID$sModule)
    If 
Not ProcessExists($iPIDThen Return SetError(100)

    If 
Not IsString($sModuleThen Return SetError(200)

    
Local   $PSAPI DllOpen("psapi.dll")

    ;
Get Process Handle
    Local   $hProcess
    Local   $PERMISSION 
BitOR(0x00020x04000x00080x00100x0020) ; CREATE_THREADQUERY_INFORMATIONVM_OPERATIONVM_READVM_WRITE

    
If $iPID 0 Then
        Local $hProcess 
DllCall("kernel32.dll""ptr""OpenProcess""dword"$PERMISSION"int"0"dword"$iPID)
        If 
$hProcess[0Then
            $hProcess 
$hProcess[0]
        EndIf
    EndIf

    ;
EnumProcessModules
    Local   $Modules 
DllStructCreate("ptr[1024]")
    
Local   $aCall DllCall($PSAPI"int""EnumProcessModules""ptr"$hProcess"ptr"DllStructGetPtr($Modules), "dword"DllStructGetSize($Modules), "dword*"0)
    If 
$aCall[4] > 0 Then
        Local   $iModnum 
$aCall[4] / 4
        Local   $aTemp
        
For $i 1 To $iModnum
            $aTemp 
=  DllCall($PSAPI"dword""GetModuleBaseNameW""ptr"$hProcess"ptr"Ptr(DllStructGetData($Modules1$i)), "wstr""""dword"260)
            If 
$aTemp[3] = $sModule Then
                DllClose
($PSAPI)
                Return 
Ptr(DllStructGetData($Modules1$i))
            EndIf
        
Next
    
EndIf

    
DllClose($PSAPI)
    Return 
SetError(-100)

EndFunc 
I just dont know how to do this in c#! Maybe you can help me
Pain1234 is offline  
Reply


Similar Threads Similar Threads
MHS PROCESS HElp
08/10/2010 - Cabal Online - 7 Replies
hey guy i need some help on cabal us/na i am using mhs and and start my cabal but i cant seem to find any exe. file from cabal or anything do with cabal when i open PROCESS so weird is every1 haven the same problem on NA or it just me
Mit Process Explorer /Process Hacker Hs umgehen
05/22/2010 - General Gaming Discussion - 1 Replies
Ich habe hier im Forum gelesen, das man mit Process Explorer bzw. Process Hacker das HS umgehen kann. Leider ist mir irgendwie schleierhaft wie das gehen soll. Vllt erbarmt sich jemand und erklärt es (:, da man den sogenannten Bypasser nur noch las Premium Dings Da bei Upload.to runterladen kann :rolleyes:
[HELP] Which process?
08/22/2009 - Grand Chase - 2 Replies
So I am new at this, when using the ME engine which process should I select? I tried the window stuff but it says it can't be opened and all the tutorials I read skip this. Sorry if this is a stupid question, and thanks in advance. EDIT: Nevermind, I read some of the older tuts and changing the settings fixed the problem.
Process of New No CRC?
12/24/2008 - Dekaron - 3 Replies
So what is the process now of the new no crc? I've came up with so many things but just can't seem to put it all together.:confused::confused:
C# how to pause a process/freeze process
12/08/2008 - CO2 Programming - 2 Replies
ya so i was semi bored and after little bit of looking around i didnt find to many examples of how to do this so attached is a demo project to show you how. basically it comes down to calling ResumeThread() and SuspendThread() (API functions) on all the threads of a process...simple enough http://img388.imageshack.us/img388/9762/exampleil 6.png please note when you enter the process name there's no ".exe" to the end Warning: this isn't idiot proof . .



All times are GMT +1. The time now is 04:34.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.