荔园在线
荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀
[回到开始]
[上一篇][下一篇]
发信人: oopilix (优雅的), 信区: Visual
标 题: [zl]dynamically load DLL and call function
发信站: 荔园晨风BBS站 (Sun Jun 1 23:23:08 2003), 站内信件
type
TMyFunc = function(Param1: Integer):Integer;stdcall;
procedure LoadAndCallDLL;
var lHandle: THandle;
func: TMyFunc;
funcResult: Integer;
begin
lHandle:=LoadLibrary('MyLib.DLL');
if lHandle <> 0 then
begin
@func:=GetProcAddress(lHandle,'myFunctionName');
if @func <> nil then
funcResult:=func(12132);
else
ShowMessage('unable to find myfunctionName entry in MyDll.DLL');
end
else
ShowMessage('unable to load MyLib.DLL');
end;
--
※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 61.144.235.39]
[回到开始]
[上一篇][下一篇]
荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店