//[2-16]注册dll或ocx文件
function reg_dll1(fn1:string):boolean;
type
TprocStdcall=procedure;stdcall;
var
dp1:TprocStdcall;
dh1:Thandle;
begin
result:=true;
try
dh1:=loadlibrary(pchar(fn1));
except
result:=false;
exit;
end;
try
if (dh1<>0) then
begin
@dp1:=getprocaddress(dh1,pchar('DllRegisterServer'));
if (@dp1<>nil) then dp1;
end;
except
result:=false;
end;
try
FreeLibrary(dh1);
except
end;
end;