From 86a034a99fe95f3316b8547055b074bed542804d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cddf=E2=80=9D?= <“ddf668490@163.com”> Date: Tue, 26 Nov 2024 11:50:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=94=A8=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public10/ThreeFun/Fun/U_RPFun.pas | 84 +++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 public10/ThreeFun/Fun/U_RPFun.pas diff --git a/public10/ThreeFun/Fun/U_RPFun.pas b/public10/ThreeFun/Fun/U_RPFun.pas new file mode 100644 index 0000000..35d3983 --- /dev/null +++ b/public10/ThreeFun/Fun/U_RPFun.pas @@ -0,0 +1,84 @@ +unit U_RPFun; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, ComCtrls, ToolWin, StdCtrls, BtnEdit, cxStyles, cxCustomData, + cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DBGrids, DB, cxDBData, + cxGridLevel, cxClasses, cxControls, cxGridCustomView, ADODB, StrUtils, Midas, + cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxTimeEdit, + cxTreeView, cxGrid, cxDBLookupComboBox, cxCalendar, cxCurrencyEdit, + cxGridExportLink, ExtCtrls, Buttons, DBClient, RTComboBox, cxDropDownEdit, + cxGridBandedTableView, cxGridDBBandedTableView, cxRichEdit, cxButtonEdit, + IniFiles, WinSock, IdHTTP, dxcore, cxTextEdit, FireDAC.Comp.Client, cxCheckBox, + Vcl.Clipbrd, cxMemo, dxLayoutControl; + +function FromPrintFr3(App: Tapplication; DataBaseStr: PChar; JsonArgs: PChar): PChar; + +function FunPrintFr3(App: Tapplication; DataBaseStr: PChar; JsonArgs: PChar): PChar; + +implementation + +function FromPrintFr3(App: Tapplication; DataBaseStr: PChar; JsonArgs: PChar): PChar; +type + TMyFunc = function(App: Tapplication; FormID: integer; Title: PChar; DataBaseStr: PChar; JsonArgs: PChar): PChar; stdcall; +var + Tf: TMyFunc; + Tp: TFarProc; + Th: Thandle; + JsonResult: PChar; +begin + Th := LoadLibrary('ReportPrint.dll'); + if Th > 0 then + begin + Tp := GetProcAddress(Th, 'GetDllForm'); + if Tp <> nil then + begin + Tf := TMyFunc(Tp); + JsonResult := Tf(Application, 11, 'FR3', DataBaseStr, JsonArgs); + end + else + begin + JsonResult := '{"succsee":false,"message": "ȡú쳣"}'; + end; + end + else + begin + JsonResult := '{"succsee":false,"message": "ҲReportPrint.dll"}'; + end; + Result := JsonResult; +end; + +function FunPrintFr3(App: Tapplication; DataBaseStr: PChar; JsonArgs: PChar): PChar; +type + TMyFunc = function(App: Tapplication; FormID: integer; Title: PChar; DataBaseStr: PChar; JsonArgs: PChar): PChar; stdcall; +var + Tf: TMyFunc; + Tp: TFarProc; + Th: Thandle; + JsonResult: PChar; +begin + Th := LoadLibrary('ReportPrint.dll'); + if Th > 0 then + begin + Tp := GetProcAddress(Th, 'GetDllForm'); + if Tp <> nil then + begin + Tf := TMyFunc(Tp); + JsonResult := Tf(Application, 12, 'FR3', DataBaseStr, JsonArgs); + end + else + begin + JsonResult := '{"succsee":false,"message": "ȡú쳣"}'; + end; + end + else + begin + JsonResult := '{"succsee":false,"message": "ҲReportPrint.dll"}'; + end; + Result := JsonResult; +end; + +end. +