我可给窗DLL和在DELPHI中调用的例子,我不太清楚

解决方案 »

  1.   

    {PT.dpr}library PT;
    uses
      SysUtils,
      Classes,
      Forms,
      Unit1 in 'unit1.pas' {DLLForm};
    function PrintTable(...) : Integer; stdcall;
    var
      Form : TForm1;
    begin
      if (Kind<1) or (Kind>7) then
        result := 1 // kind error
      else
      begin
        Form := TForm1.Create(Application);
        Form.ShowModal;
        Form.Free;
        result := ...
    end;
    exports
      PrintTable;
      
    begin
    end.{unit1.pas}
    unit Unit1;interface
    ....