动态加载dll

function LoadBosAdo: Boolean;
begin
Result := False;

if HdlAdpt = 0 then
begin
HdlAdo := LoadLibrary(PChar('BOSADO.dll'));
Result := HdlAdo <> 0;
if Result then
begin
AttachAdo := GetProcAddress(HdlAdo, 'AttachAdo');
Result := (@AttachAdo) <> nil;

if not Result then
begin
FreeLibrary(HdlAdo);
HdlAdo := 0;
end;
end;
end;
end;

posted @ 2018-03-22 15:24  RainWork  阅读(99)  评论(0)    收藏  举报