我也希望有解决的办法,但我估计这种方法存在的可能性不大
解决方案 »
- 有关delphi中的联合类型
- 读取字符串的问题
- save as dialog 选中filter默认项以外的后缀时
- 关于delphi中,ado的几个简单应用?
- 连接MS SQL Server数据库,写连接串有没有比使用UDL文件更安全(当然要保持通用性,以便在程序多个地方调用)的写法
- 求段sql server数据库存取word文件的代码
- 有关过程调用的问题
- dbexpress如何在代码里指定连哪个数据库?
- 那有DELPHI6企业版下载,给分
- Get sysmenu\append sysmenu
- 怎样才能检测到DBgrid是否已经UpdateBatch了?
- 怎样同时注释(或撤消注释)多行代码,向VB一样?
procedure TForm1.Button1Click(Sender: TObject);
var D: Double;
DLLHandle: THandle;
Func: TGetDouble;
begin
Image1.Picture.Assign(Table1Graphic);
Table1Graphic.Assign(Image1.Picture);
Exit;
DLLHandle := LoadLibrary('DLLOne.dll');
try
@Func := GetProcAddress(DLLHandle, 'GetDouble'); //Edit1.Text := IntToStr(GetInteger(2));
//D := GetDouble(2.2);
if Assigned(@Func) then
begin
D := Func(2.2);
Edit2.Text := FloatToStr(D);
end; finally
FreeLibrary(DLLHandle);
end;
end;end.隐式例子:library DLLOne;uses
SysUtils,
Classes;{$R *.res} function GetDoubleExt(F:Double): Double;stdcall;external 'DLLTwo.dll';
function GetInt(I:Integer): Integer;stdcall;external 'DLLTwo.dll'; function GetInteger(I:Integer): Integer;stdcall;
begin
Result := GetInt(I);
end; function GetDouble(D:Double): Double;stdcall;
begin
Result := GetDoubleExt(D);
end;exports
GetInteger,
GetDouble;begin
end.