AutoHotkey Community

It is currently May 27th, 2012, 5:39 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Can AHK inject DLL ?
PostPosted: March 15th, 2010, 2:47 am 
Offline

Joined: February 27th, 2010, 9:04 pm
Posts: 10
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 ??


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 15th, 2010, 7:50 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
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! <--


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], HotkeyStick, mrhobbeys and 58 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group