LoadTypeLibEx function (oleauto.h)
Loads a type library and (optionally) registers it in the system registry.
Syntax
HRESULT LoadTypeLibEx(
LPCOLESTR szFile,
REGKIND regkind,
ITypeLib **pptlib
);
Parameters
szFile
The type library file.
regkind
Identifies the kind of registration to perform for the type library based on the following flags: DEFAULT, REGISTER and NONE. REGKIND_DEFAULT simply calls LoadTypeLib and registration occurs based on the LoadTypeLib registration rules. REGKIND_NONE calls LoadTypeLib without the registration process enabled. REGKIND_REGISTER calls LoadTypeLib followed by RegisterTypeLib, which registers the type library. To unregister the type library, use UnRegisterTypeLib.
pptlib
The type library.
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. |
|
The type library or DLL could not be loaded. |
Remarks
Enables programmers to specify whether or not the type library should be loaded.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | oleauto.h |
Library | OleAut32.lib |
DLL | OleAut32.dll |