HRESULT RegisterTypeLib( ITypeLib FAR* ptlib, OLECHAR FAR* szFullPath, OLECHAR FAR* szHelpDir );
Adds information about a type library to the system registry.
Pointer to the type library being registered.
Fully qualified path specification for the type library being registered.
Directory in which the Help file for the library being registered can be found. Can be Null.
The return value obtained from the returned HRESULT is one of the following:
S_OK
Success.
E_OUTOFMEMORY
Out of memory.
E_INVALIDARG
One or more of the arguments is invalid.
TYPE_E_IOERROR
The function could not write to the file.
TYPE_E_REGISTRYACCESS
The system registration database could not be opened.
TYPE_E_INVALIDSTATE
The type library could not be opened.
The function RegisterTypeLib can be used during application initialization to register the application's type library correctly. When RegisterTypeLib is called to register a type library, both the minor and major version numbers are registered in hexadecimal.
In addition to filling in a complete registry entry under the type library key, RegisterTypeLib adds entries for each of the dispinterfaces and Automation-compatible interfaces, including dual interfaces. This information is required to create instances of these interfaces. Coclasses are not registered (that is, RegisterTypeLib does not write any values to the CLSID key of the coclass).
For an explanation of the requirement values, see Requirements.
Windows NT/2000: Requires Windows NT 3.1 or later. Windows 95/98: Requires Windows 95 or later. Header: Declared in oleauto.h. Library: Use oleaut32.lib.