dromenox Posted September 7, 2014 Share Posted September 7, 2014 Well, I'll make a program that will serve as a GUI to make hooks. My program will inject a DLL made in C ++ in a process. What I wanted to do is that when the hooked function was called the DLL somehow call a function in AutoIt with the parameters of the hooked function. In short I want the DLL call a function within my AutoIt program passing parameters. Link to comment Share on other sites More sharing options...
JohnOne Posted September 7, 2014 Share Posted September 7, 2014 DllCallbackRegister() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
dromenox Posted September 7, 2014 Author Share Posted September 7, 2014 My DLL Code: #include <windows.h> #include <detours.h> #include <stdio.h> #define ADDRESS 0x4016B0 int (__cdecl* originalFunction)(int, int); int hookedFunction(int a, int b) { // MyFunc(a, b); Example return originalFunction(a, b); } BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved) { switch (dwReason) { case DLL_PROCESS_ATTACH: originalFunction = (int(__cdecl*)(int, int))DetourFunction((PBYTE)ADDRESS, (PBYTE)hookedFunction); //Magic break; } return TRUE; } My AutoIt code: Func MyFunc($a, $b) ConsoleWrite($a, $b) EndFunc While 1 Wend could help me do this in my case? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now