AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can AHK inject DLL ?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
DistortioN



Joined: 27 Feb 2010
Posts: 10

PostPosted: Mon Mar 15, 2010 1:47 am    Post subject: Can AHK inject DLL ? Reply with quote

As topic title says, can ahk inject dll's ?
Trough dllcall() maybe?

i want to inject a dll into a game... the dll looks like this atm :

Code:
#include "stdafx.h"
#include <windows.h>
#define JMP(frm,to) (((int)to - (int)frm)-5)
DWORD Adress = 0x00553A83;
DWORD RetAdress = (Adress + 7); // cause 2 nops
__declspec(naked) void myCodeCave ()
{
  __asm
  {
cmp [eax+0x70], 0x5D4D475B          //[GM]
je [00000000]
mov [esi+0x0c],0x00000000
jmp [RetAdress]
  }
}

void GMDetect ()
{
   *(BYTE*)Adress = 0xe9; // defining jump opcode
   *(DWORD*)(Adress+1) = JMP(Adress,myCodeCave);
   *(WORD*) (Adress +5)= 0x9090;
}

void dllmain()
{
GMDetect();
return;
}


so if i could inject this using dllcall() can somebody give me the correct parameters to use ??
Back to top
View user's profile Send private message
Tuncay



Joined: 07 Nov 2006
Posts: 1886
Location: Germany

PostPosted: Mon Mar 15, 2010 6:50 pm    Post subject: Reply with quote

Do you mean call a function from the Dll by "inject"? Then look at the DllCall() function.
_________________
{1:"ahkstdlib", 2:"my libs", 3:"my apps", 4:"my license"}
--> Don't feed the troll! <--
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group