[delphi] How to register an OCX
http://www.delphifaq.com/faq/delphi_windows_API/f515_0.htm
program RegisterMyOCX;
uses
OLECtl, Windows, Dialogs;
var
OCXHand: THandle;
RegFunc: TDllRegisterServer; //add to the uses clause
begin
OCXHand:= LoadLibrary('c:\windows\system\test.ocx');
RegFunc:= GetProcAddress(OCXHand, 'DllRegisterServer'); //case sensitive
if RegFunc <> 0 then
RegFunc
else
ShowMessage('Error!')
FreeLibrary(OCXHand);
// You can the same way unregister the OCX:
// replace 'DllRegisterServer' by 'DllUnregisterServer'
end.
반응형
'Delphi, RadStudio' 카테고리의 다른 글
[개발/Delphi] TWebbrowser 의 찾는 문자열에 형광팬 효과 주기 (0) | 2011.12.20 |
---|---|
[개발/delphi] 자기 자신을 지우는 프로그램 만들기(delphi) (0) | 2011.12.12 |
[개발/delphi] Starting and stopping Windows services (0) | 2011.12.12 |
[개발/delphi] how to have an exe file delete itself (0) | 2011.12.12 |
[개발/delphi] 외부 프로그램 실행하고 기다리기 Execute and wait (0) | 2011.12.12 |
댓글