一个通用的动态装载DLL的函数
[赣]Bahamut(28103589) 10:31:20
function LoadDLL(const DLLName, FuncName: string): Pointer;
var hModule: Windows.HMODULE;
begin
Result:= nil;
if not FileExists(DLLName) then Exit;
hModule:= LoadLibrary(PChar(DLLName));
if hModule = 0 then Exit;
try
Result:= GetProcAddress(hModule, PChar(FuncName));
finally
FreeLibrary(hModule);
end;
end;
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/archive/2008/06/21/2940862.html