ICreateTypeLib::CreateTypeInfo method (oaidl.h)
Creates a new type description instance within the type library.
Syntax
HRESULT CreateTypeInfo(
[in] LPOLESTR szName,
[in] TYPEKIND tkind,
[out] ICreateTypeInfo **ppCTInfo
);
Parameters
[in] szName
The name of the new type.
[in] tkind
TYPEKIND of the type description to be created.
[out] ppCTInfo
The type description.
Return value
This method 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. |
|
Insufficient memory to complete the operation. |
|
The state of the type library is not valid for this operation. |
|
The provided name is not unique. |
|
Type mismatch. |
Remarks
Use ICreateTypeLib to create a new type description instance within the library. An error is returned if the specified name already appears in the library. Valid tkind values are described in TYPEKIND. To get the type information of the type description that is being created, call IUnknown::QueryInterface(IID_ITypeInfo, ...)
on the returned ICreateTypeLib. This type information can be used by other type descriptions that reference it by using ICreateTypeInfo::AddRefTypeInfo.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | oaidl.h |