Вниз
Скачать: 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 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.011 c
3-26858
Igr
2002-08-19 11:12
2002.09.09
Sql и независимость от регистра символов


14-27222
Polevi
2002-08-12 16:14
2002.09.09
полосатый грид


14-27193
Человечек
2002-08-14 13:06
2002.09.09
Нашествие голубых человечков


4-27289
voronkov
2002-07-08 12:21
2002.09.09
Подкиньте пожалуйста пример SaveAs для Excel из Delphi


8-27126
JC
2002-05-04 14:49
2002.09.09
Универсальный графический формат.




   Наверх