Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.09.09;
Скачать: CL | DM;

Вниз

Как из чужой Dll-ки вызывать диалоги и функции   Найти похожие ветки 

 
Demn ©   (2002-08-27 10:20) [0]

В общем есть Dll (компилированная и без исходников) из нее необходимо вызвать пару диалогов и несколько функций. Подскажите как ето сделать. А то уже давно не видел Delphi и забыл все что можно. Зараннее благодарен.


 
c0pyc@t ©   (2002-08-27 10:26) [1]

А какие функции есть знаешь, и как называются??7


 
Mike_Goblin ©   (2002-08-27 10:26) [2]

Нет ничего лучще help-а


Importing functions from libraries

To import routines from a dynamically loadable library (.so or .DLL), attach a directive of the form

external stringConstant;

to the end of a normal procedure or function header, where stringConstant is the name of the library file in single quotation marks. For example, on Windows

function SomeFunction(S: string): string; external "strlib.dll";

imports a function called SomeFunction from strlib.dll.
On Linux,

function SomeFunction(S: string): string; external "strlib.so";

imports a function called SomeFunction from strlib.so.
You can import a routine under a different name from the one it has in the library. If you do this, specify the original name in the external directive:

external stringConstant1 name stringConstant2;

where the first stringConstant gives the name of the library file and the second stringConstant is the routine’s original name.
On Windows: For example, the following declaration imports a function from user32.dll (part of the Windows API).

function MessageBox(HWnd: Integer; Text, Caption: PChar; Flags: Integer): Integer;
stdcall; external "user32.dll" name "MessageBoxA";

The function’s original name is MessageBoxA, but it is imported as MessageBox.
Instead of a name, you can use a number to identify the routine you want to import:

external stringConstant index integerConstant;

where integerConstant is the routine’s index in the export table.
On Linux: For example, the following declaration imports a standard system function from libc.so.6.

function OpenFile(const PathName: PChar; Flags: Integer): Integer; cdecl;
external "libc.so.6" name "open";

The function’s original name is open, but it is imported as OpenFile.
In your importing declaration, be sure to match the exact spelling and case of the routine’s name. Later, when you call the imported routine, the name is case-insensitive.


 
Demn ©   (2002-08-27 10:43) [3]

Фишка в том, что имен и индексов функций я не знаю.


 
murza   (2002-08-27 10:51) [4]

А как же утилита tdump? Быстрый просмотр?
Тяжело чтоль список экспорта получить?


 
Demn ©   (2002-08-28 06:46) [5]

Все народ - отдых. Все что нужно я нашел.



Страницы: 1 вся ветка

Текущий архив: 2002.09.09;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.014 c
1-27026
Yaro
2002-08-23 13:38
2002.09.09
Блокировка выхода в и-нет


3-26926
Guts
2002-08-19 19:47
2002.09.09
Работа с dbf без bde под Delphi 6


3-26884
BJValentine
2002-08-19 16:05
2002.09.09
Параметр в запросе


1-27049
Nikola62
2002-08-27 13:29
2002.09.09
Как перечеркнуть линией TPanel


4-27284
hovl
2002-07-19 20:46
2002.09.09
Перехват обращения к файлу системы