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

Вниз

DLL S   Найти похожие ветки 

 
Oleg Gashev ©   (2001-12-15 18:35) [1]

Calling DLLs

Topic group See also

Before you can call routines defined in a DLL, you must import them. This can be done in two ways: by declaring an external procedure or function, or by calling the Windows API directly. Whichever method you use, the routines are not linked to your application until runtime. This means that the DLL need not be present when you compile your program. It also means that there is no compile-time validation of attempts to import a routine.
Object Pascal does not support importing of variables from DLLs.

Static loading

The simplest way to import a procedure or function is to declare it using the external directive. For example,

procedure DoSomething; external "MYLIB.DLL";

If you include this declaration in a program, MYLIB.DLL is loaded once, when the program starts. Throughout execution of the program, the identifier DoSomething always refers to the same entry point in the same DLL.
Declarations of imported routines can be placed directly in the program or unit where they are called. To simplify maintenance, however, you can collect external declarations into a separate “import unit” that also contains any constants and types required for interfacing with the DLL. (Delphi’s Windows unit is a good example.) Other modules that use the import unit can call any routines declared in it.

For more information about external declarations, see External declarations .
Dynamic loading through Windows API calls.




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

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

Наверх




Память: 0.46 MB
Время: 0.016 c
1-22034
Alexey_K
2001-12-15 16:35
2002.01.08
Форма


7-22442
Alexei
2001-09-26 15:20
2002.01.08
Как определить наличие модема?


7-22453
Juri
2001-09-21 18:26
2002.01.08
RS485


1-22229
Man In Red
2001-12-16 14:31
2002.01.08
Опять вопрос связаный с RichEdit!


1-22140
Serg5
2001-12-20 10:17
2002.01.08
Вопрос, есть ли возможность уменьшить шрифт до 4 пикселей, менятся он меняется(программа не ругается), а на экран (Canvas.Font) он всё равно выводится 8 (самым минимальным)