I've used to do it under delphi, creating a library, then exporting one fonction and return creating form
but to give access violation error message pls help ???

(((
library video;
{$mode objfpc}{$H+}
uses
Interfaces,
Classes,
Dialogs,
Forms,
hatamsg,
functionList,
main,
TCompInst,
AnimationLabel,
serkanxmldom;
function ShowVideoForm: TForm; cdecl;
begin
frmVideo := TfrmVideo.Create(nil);
Result := frmVideo;
end;
exports
ShowVideoForm;
begin
end.