library InitDLL;
 
{Martin Harvey 9/10/2000}
 
uses
 SysUtils,
 Windows,
 Dialogs,
 TestUnit in 'TestUnit.pas';
 
procedure FancyMessage;stdcall;
begin
 TestUnit.UnitProc;
end;
 
procedure EntryPointFunc(Reason:integer);
begin
 case reason of
 DLL_PROCESS_ATTACH:ShowMessage('EntryPoint. Proceso adjuntado.');
 DLL_THREAD_ATTACH:ShowMessage('EntryPoint. Hilo adjuntado.');
 DLL_PROCESS_DETACH:ShowMessage('EntryPoint. Proceso separado.');
 DLL_THREAD_DETACH:ShowMessage('EntryPoint. Hilo separado.');
 else
 ShowMessage('EntryPoint. Razn desconocida.');
 end;
end;
 
exports FancyMessage;
 
begin
 ShowMessage('Main DLL Body.');
 DLLProc := @EntryPointFunc;
end.