[阅读: 672] 2007-10-23 03:40:24
procedure RegisterAxLib( FileName: string );
type
TRegProc = function : HResult; stdcall;
TRegAction = (raReg, raUnreg);
var
LibHandle: THandle;
RegProc: TRegProc;
const
RegAction: TRegAction = raReg;
ProcName: array[TRegAction] of PChar = (
'DllRegisterServer', 'DllUnregisterServer');
begin
LibHandle := LoadLibrary(PChar(FileName));
if LibHandle = 0 then raise Exception.CreateFmt(SLoadFail, [FileName]);
try
@RegProc := GetProcAddress(LibHandle, ProcName[RegAction]);
if @RegProc = nil then
raise Exception.CreateFmt(SCantFindProc, [ProcName[RegAction], FileName]);
if RegProc <> 0 then
raise Exception.CreateFmt(SRegFail, [ProcName[RegAction], FileName]);
// OutputStr(Format(SRegSuccessful, [ProcName[RegAction]]))
finally
FreeLibrary(LibHandle);
end;
end;
Notemper2x 3.1 ( ̄ε( ̄#)
没脾气2x 之 个人综合篇:
http://notemper2x.cndev.org/
我的 panoramio 相册:
http://panoramio.com/user/zhaixudong
我的 flickr相册:
http://www.flickr.com/photos/notemper2x/


QQ号20250出售,售价400,000元整(5位、皇冠80级、VIP7)a