Introduction
The purpose of this small utility is to register and unregister type libraries. If you are a COM developer, you know how useful a type library can be, especially for high level languages like Visual Basic that depends heavily on external type definitions as it does not support the creation of new types.
However, if you know this, you probably know that your registry is most likely clogged with type library registration data that you probably don't use, either because the type library you found on the Internet did not work, or because you found a better one, etc. How to remove this junk information now? This utility should do the trick for you.
Usage
This is a utility meant to be used from the command prompt (or the Run dialog box). The syntax is:
registertlb.exe [/r|/u] <filename>
If <filename> has spaces (normally long file names do), you must enclose <filename> in quotation marks. Example:
registertlb.exe /r "C:\My documents\mytypelibrary.tlb"
You can omit the /r switch for registration as long as you are sure there are no trailing spaces after the filename.
The exit code for the process is the HRESULT returned by the registration or unregistration function. Also, a return value of -1 means Out of Memory, and -2 means Invalid command line argument.
Comments