Try the code below:
...
uses Windows, SysUtils, ComObj;
...
function OLERegister(strFileName : STRING) : BOOLEAN;
type
TOleRegister = function : HResult;
var
hLib : THandle;
fnAdr: TFarProc;
begin
Result := FALSE;
hLib := LoadLibrary(PCHAR(strFileName));
if (hLib > 0) then
begin
try
fnAdr := GetProcAddress(hLib, pchar('DllRegisterServer'))
if (fnAdr <> nil) then
Result := (TOleRegister(fnAdr) >= 0);
finally
FreeLibrary(hLib);
end;
end;
end;