DLL 등을 등록하려면 regsvr32 DLL이름 으로 등록한다. (등록해제는 regsvr32 /u DLL이름)

 

동적으로 등록하는 방법이 있었다.

RegisterComServer(DLL이름);

 

ex) 프로젝트 파일(.dpr)에서 한다.

 

program RegistComServer;

  

uses 

Forms, 

ComObj, 

Main in 'Main.pas' {Form1}

 

{$R *.res}

  

const DLL_FILE='xx.dll'

  

begin 

Application.Initialize; 

if FileExists(DLL_FILE) then begin 

RegisterComServer(DLL_FILE); // DLL 등록

end 

else begin 

Application.Terminate; 

Exit; 

end

Application.Title:='RegistComServer'

Application.CreateForm(TForm1, Form1); 

Application.Run; 

end







Posted by bloodguy
,