87 lines
2.8 KiB
ObjectPascal
87 lines
2.8 KiB
ObjectPascal
|
unit U_dynamicsDll;
|
|||
|
|
|||
|
interface
|
|||
|
uses
|
|||
|
Windows, Messages, SysUtils,Dialogs, Variants, Classes,Forms;
|
|||
|
|
|||
|
function showFr3LableForm(userCode:string;userName:string;connStr:string;title:string):integer;
|
|||
|
function showRmfLableForm(userCode:string;userName:string;connStr:string;title:string):integer;
|
|||
|
var
|
|||
|
newh: hwnd;
|
|||
|
|
|||
|
implementation
|
|||
|
|
|||
|
//<2F><>ʾreportMachine<6E><65>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD> userCode <20><><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>;userName:<3A>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD> connstr:<3A><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>Ӵ<EFBFBD>; titile<6C><65><EFBFBD><EFBFBD><EFBFBD>ڱ<EFBFBD>ǩ
|
|||
|
// fast report <20><><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>ǩrecid <20><>¼<EFBFBD><C2BC> 1
|
|||
|
function showRmfLableForm(userCode:string;userName:string;connStr:string;title:string):integer;
|
|||
|
type
|
|||
|
TMyFunc = function(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd; stdcall;
|
|||
|
var
|
|||
|
Tf: TMyFunc;
|
|||
|
Tp: TFarProc;
|
|||
|
Th: Thandle;
|
|||
|
begin
|
|||
|
result:=0;
|
|||
|
Th := LoadLibrary('labelDesign.dll');
|
|||
|
if Th > 0 then
|
|||
|
begin
|
|||
|
try
|
|||
|
Tp := GetProcAddress(Th, 'GetDllForm');
|
|||
|
if Tp <> nil then
|
|||
|
begin
|
|||
|
Tf := TMyFunc(Tp);
|
|||
|
result := Tf(Application, 0, 1, 0, 0, PChar(userCode), PChar(userName), PChar(''), PChar(title), PChar(''), PChar(''), '', '', '', '', '', '', '', '', PChar(connStr));
|
|||
|
end
|
|||
|
else
|
|||
|
begin
|
|||
|
ShowMessage('<27><>ӡִ<D3A1>д<EFBFBD><D0B4><EFBFBD>');
|
|||
|
end;
|
|||
|
finally
|
|||
|
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
begin
|
|||
|
ShowMessage('<27>Ҳ<EFBFBD><D2B2><EFBFBD>labelDesign.dll' );
|
|||
|
end;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
//<2F><>ʾfr3<72><33>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD> userCode <20><><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>;userName:<3A>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD> connstr:<3A><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>Ӵ<EFBFBD>; titile<6C><65><EFBFBD><EFBFBD><EFBFBD>ڱ<EFBFBD>ǩ
|
|||
|
// fast report <20><><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>ǩrecid <20><>¼<EFBFBD><C2BC> 10
|
|||
|
function showFr3LableForm(userCode:string;userName:string;connStr:string;title:string):integer;
|
|||
|
type
|
|||
|
TMyFunc = function(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd; stdcall;
|
|||
|
var
|
|||
|
Tf: TMyFunc;
|
|||
|
Tp: TFarProc;
|
|||
|
Th: Thandle;
|
|||
|
begin
|
|||
|
result:=0;
|
|||
|
Th := LoadLibrary('labelDesign.dll');
|
|||
|
if Th > 0 then
|
|||
|
begin
|
|||
|
try
|
|||
|
Tp := GetProcAddress(Th, 'GetDllForm');
|
|||
|
if Tp <> nil then
|
|||
|
begin
|
|||
|
Tf := TMyFunc(Tp);
|
|||
|
result := Tf(Application, 0, 10, 0, 0, PChar(userCode), PChar(userName), PChar(''), PChar(title), PChar(''), PChar(''), '', '', '', '', '', '', '', '', pchar(connStr));
|
|||
|
end
|
|||
|
else
|
|||
|
begin
|
|||
|
ShowMessage('<27><>ӡִ<D3A1>д<EFBFBD><D0B4><EFBFBD>');
|
|||
|
end;
|
|||
|
finally
|
|||
|
|
|||
|
end;
|
|||
|
end
|
|||
|
else
|
|||
|
begin
|
|||
|
ShowMessage('<27>Ҳ<EFBFBD><D2B2><EFBFBD>labelDesign.dll' );
|
|||
|
end;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
end.
|