RegisterTypeLib function (oleauto.h)
Adds information about a type library to the system registry.
Syntax
HRESULT RegisterTypeLib(
ITypeLib *ptlib,
[in] LPCOLESTR szFullPath,
[in, optional] LPCOLESTR szHelpDir
);
Parameters
ptlib
The type library.
[in] szFullPath
The fully qualified path specification for the type library.
[in, optional] szHelpDir
The directory in which the Help file for the library being registered can be found. This parameter can be null.
Return value
This function can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
One or more of the arguments is not valid. |
|
Insufficient memory to complete the operation. |
|
The function could not write to the file. |
|
The system registration database could not be opened. |
|
The type library could not be opened. |
Remarks
This function 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).
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | oleauto.h |
Library | OleAut32.lib |
DLL | OleAut32.dll |