Share via


ICreateTypeLib::CreateTypeInfo

This method creates a new type description instance within the type library.

HRESULT CreateTypeInfo( 
  OLECHAR FAR* szName, 
  TYPEKIND tkind, 
  ICreateTypeInfo FAR* FAR* ppCTInfo
);

Parameters

  • szName
    [in] Null-terminated string that contains the name of the new type.
  • tkind
    [in] TYPEKIND of the type description to be created.
  • ppCTInfo
    [out] On return, pointer to the type description.

Return Values

The following table shows the return values for this function.

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 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.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Oaidl.h, Oaidl.idl.
Link Library: Oleaut32.lib, Uuid.lib.

See Also

ICreateTypeLib | ICreateTypeInfo | ICreateTypeInfo::AddRefTypeInfo | TYPEKIND | IUnknown::QueryInterface

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.