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

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Oaidl.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.