ICreateTypeLib::CreateTypeInfo (Windows Embedded CE 6.0)
1/6/2010
This method creates a new type description instance within the type library.
Syntax
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 Value
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
Header | oaidl.h, oaidl.idl |
Library | oleaut32.lib, uuid.lib |
Windows Embedded CE | Windows CE 2.0 and later |
See Also
Reference
ICreateTypeLib
ICreateTypeInfo
ICreateTypeInfo::AddRefTypeInfo
TYPEKIND
IUnknown::QueryInterface