HRESULT CreateTypeInfo(
OLECHAR FAR* szName,
TYPEKIND tkind,
ICreateTypeInfo FAR* FAR* ppCTInfo
);
Creates a new type description instance within the type library.
The return value of the returned HRESULT is one of the following:
Return value | Meaning |
---|---|
S_OK | Success. |
STG_E_INSUFFICIENTMEMORY | Out of memory. |
E_OUTOFMEMORY | Out of memory. |
E_INVALIDARG | One or more of the arguments is invalid. |
TYPE_E_INVALIDSTATE | The state of the type library is not valid for this operation. |
TYPE_E_NAMECONFLICT | The provided name is not unique. |
TYPE_E_WRONGTYPEKIND | Type mismatch. |
Use the function CreateTypeInfo 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 the "TYPEKIND" section in Chapter 9, "Type Description Interfaces." To get the type information of the type description that is being created, call IUnknown::QueryInterface(IID_ITypeInfo, ...) on the returned ICreateTypeInfo. This type information can be used by other type descriptions that reference it by using ICreateTypeInfo::AddRefTypeInfo.