Code :
- Procedure TForm_Main.ActAboutExecute(Sender: TObject);
- var
- Company, Project, Version : Pchar; ComSize, ProjSize, VerSize : Cardinal;
- Begin
- ComSize := 25; ProjSize := 25; VerSize := 25;
- Company := 'Napier University'; Project := ‘Honours Project’; Version := '1.4';
- Hdle := loadlibrary('dll\abBox.dll');
- if Hdle <> 0 then
- begin
- try
- @DllFormCreate := GetProcAddress(Hdle, 'Create_Form');
- if @DllFormCreate <> nil then
- begin
- DllFormCreate();
- end;//if
- @MyInfo := GetProcAddress(Hdle, 'DisplayInfo');
- if @MyInfo <> nil then
- begin
- MyInfo(Company, Project, Version, ComSize, ProjSize, VerSize);
- end;//if
- @DllFormFree := GetProcAddress(Hdle, 'Free_Form');
- if @DllFormFree <> nil then
- begin
- DllFormFree();
- end;
- finally
- FreeLibrary(Hdle);
- end;//try...finally
- end//if Hdle...
- else
- MessageDlg(Err_Msg_Dll,mtError,[mbOk],0);
- End;
|