This method creates a new type description instance within the type library.
At a Glance
Header file: | Oaidl.h |
Windows CE versions: | 2.0 and later |
Syntax
HRESULT CreateTypeInfo( OLECHAR FAR* szName, TYPEKIND tkind,
ICreateTypeInfo FAR* FAR* ppCTInfo );
Parameters
szName
Null-terminated string that contains the name of the new type.
tkind
TYPEKIND of the type description to be created.
ppCTInfo
On return, pointer to the type description.
Return Values
One of the values described in the following table is returned.
Value | Description |
S_OK | Success. |
STG_E_INSUFFICIENTMEMORY | Out of memory. |
E_OUTOFMEMORY | Out of memory. |
E_INVALIDARG | One or more of the parameters 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. |
Remarks
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. 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.