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

Вниз

ExitProc в Library   Найти похожие ветки 

 
MDL   (2003-08-13 15:24) [0]

Подскажите, пожалуйста, почему не выполняется код процедуры MyExitProc в Dll:

library Test;

var
SaveExit: Pointer;

procedure MyExitProc;
begin
ShowMessage("ExitProc executed"); // не работает
ExitProc := SaveExit;
end;

begin
SaveExit := ExitProc;
ExitProc := @MyExitProc;
ShowMessage("Library initialized"); // работает
end.


 
Skier ©   (2003-08-13 15:30) [1]

1)ExitProc is only used when generating .EXE files.
2) Because ExitProc is not compatible with packages, it is not
recommended that you assign a value to ExitProc. Instead,
add code to the finalization section of a unit.


 
Толик ©   (2003-08-13 15:31) [2]

взято из help"а
...ExitProc is only used when generating executable files...


 
MDL   (2003-08-13 15:40) [3]

Тоже взято из help
Topic group:Dynamic-link libraries and packages

...
When a library is unloaded, it’s exit procedures are executed by repeated calls to the address stored in ExitProc, until ExitProc becomes nil.


 
Толик ©   (2003-08-13 16:08) [4]

М-да, и правда, в хелпах ерунда какая-то написана:
Library initialization code:
Library initialization code can also install an exit procedure using the ExitProc variable, as described in Exit procedures; the exit procedure executes when the library is unloaded.
ExitProc variable
ExitProc is only used when generating executable files. Do not use ExitProc within a dynamically loaded package.

Не верь глазам своим...
А вообще-то, я этот вопрос поднимал пару дней назад. Ответ нашёлся у Borlanda: http://community.borland.com/article/0,1410,27753,00.html



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

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

Наверх




Память: 0.47 MB
Время: 0.014 c
14-81918
Igorek
2003-08-05 12:25
2003.08.25
Народ, помогите бросить курить


4-82022
Omega27
2003-06-22 22:23
2003.08.25
message from other windows...


1-81784
3APA3A
2003-08-14 02:24
2003.08.25
Про сервисы...


4-82006
chernoruk
2003-06-24 21:21
2003.08.25
Путь к файлу по заголовку окна?


11-81602
_Ed_
2002-12-16 14:42
2003.08.25
Глюк TKOLBitBtn