Home > How-To > Register/Unregister type library
Created | Sep 12, 2001 | |
Last update | Jan 08, 2002 | |
Method #1 | Using Borland tregsvr.exe utility. | |
Register | tregsvr.exe <type library file> | |
Unregister | tregsvr.exe -u <type library file> | |
Note | If you own Borland Delphi you can find source at: <Delphi>\Demos\ActiveX\TRegSvr\ | |
Method #2 | Using Microsoft regtlib.exe utility. | |
Register | regtlib.exe <type library file> | |
Unregister | Unfortunatly it has no unregister functionality ;-(. | |
Note |
Next Microsoft products are shipped with it: |
|
Method #3 | Using Win32 API | |
Register | 1. Call LoadTypeLib function to get ITypeLib interface pointer 2. Call RegisterTypeLib to register type library using ITypeLib |
|
Unregister | 1. Call LoadTypeLib function to get ITypeLib interface pointer 2. Call GetLibAttr method of ITypeLib interface to get pointer to Type Library attributes 3. Call UnRegisterTypeLib to unregister type library |
|
Delphi code | function
RegisterTLB(const aFile: string):
boolean; |
|
function
UnRegisterTLB(const aFile:
string): boolean; |
||
See also | RegCOM |