Сейчас на форуме: hgdagon (+5 невидимых)

 eXeL@B —› Программирование —› add function to a compiled Exe-File delphi
Посл.ответ Сообщение

Ранг: 55.1 (постоянный)
Активность: 0.020
Статус: Участник

Создано: 07 августа 2007 00:11
· Личное сообщение · #1

Hi friends
i have compiled Exe-File and i want to open dialog
load it and add call function from my DLL.
(so when you run compiled Exe-File will call function from
my DLL FILE)
please how to do that i searched all internet but found
nothing




Ранг: 126.7 (ветеран)
Активность: 0.140
Статус: Участник
#CCh

Создано: 07 августа 2007 02:12
· Личное сообщение · #2

1. write code in file, where you see many 00
2. insert jmp or call to you code, from place, what you need
3. post in future here:
http://www.exelab.ru/f/action=vtopic&forum=10
4. sory me about my english

-----
invoke OpenFire




Ранг: 85.5 (постоянный)
Активность: 0.040
Статус: Участник

Создано: 07 августа 2007 12:58 · Поправил: DMD
· Личное сообщение · #3

abatu пишет:
(so when you run compiled Exe-File will call function from my DLL FILE)


Ice-T пишет:
1. write code in file, where you see many 00
2. insert jmp or call to you code, from place, what you need


As for as I undestood problem, this way doesn't comfortable for abatu.

abatu
(I hope, you know how create DLL include all necessary dialogs or functions.)
First of all, you must decide when do you want to execute new code from DLL. After loading Exe-file but before it executing or in somewhere inside Exe-file.
It's very important moment.

Second step is:
you can create a new section for Exe-file and write mini-loader there by hands. This code will load DLL and execute function "A" from DLL. This function include all your dialogs or functions.

if no necessary to load DLL first,
for run mini-loader you must using splicing - rewrite original code in the Exe-file by jump or call command for run mini-loader. You must execute overwriting original commands. Remember always about stack and registers!

if you want to load DLL and execute new code first,
correct EP in PE header to mini-loader code in new section + return to original code in your Exe-file.

These both ways are more easy because mini-loader is very small because knows about function A only. And you can to change main function(s) rewrite DLL only.

Good luck!



Ранг: 222.2 (наставник), 115thx
Активность: 0.140.01
Статус: Участник

Создано: 07 августа 2007 15:04
· Личное сообщение · #4

Use PELib (you can find it in internet) - this library will help you to add record about import table in PE File. And then patch it how you want( it is 2 methods to call it). So ... if you are a good patch-maker you can write a code without a PELib - only a patch and use Method 2. And read my post

-----
все багрепорты - в личные сообщения




Ранг: 55.1 (постоянный)
Активность: 0.020
Статус: Участник

Создано: 07 августа 2007 20:43
· Личное сообщение · #5

Hi friend
I’ve been very interested with your solution but how to Create a new section for Exe-file and write mini-loader?


 eXeL@B —› Программирование —› add function to a compiled Exe-File delphi
Эта тема закрыта. Ответы больше не принимаются.
   Для печати Для печати