function abcd(x: integer): integer; stdcall;
var
Form1: TForm1;
implementation
function abcd(x: integer): Integer; stdcall;
begin
Result := x * 2;
end;
{$R *.dfm}
exports
abcd;
var
abcd:function(x:integer):Integer;stdcall;
H: THandle;
begin
h := LoadLibrary('exeDllTest.exe');
if H > 32 then
begin
@abcd := GetProcAddress(h, 'abcd');
ShowMessage(inttostr(abcd(8)));
end;
FreeLibrary(h);
end;
exe也可以当Dll用
最新推荐文章于 2024-05-15 09:33:17 发布