Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method retrieves the number of type information interfaces that an object provides, either 0 or 1.

Syntax

HRESULT GetTypeInfoCount( 
  unsigned int FAR* 
pctinfo 
);

Parameters

pctinfo

[out] Pointer to a location that receives the number of type information interfaces provided by the object. If the object provides type information, this number is 1; otherwise the number is 0.

Return Value

If the method succeeds, the return value is S_OK.

If the method fails, the return value is E_NOTIMPL.

Remarks

The function may return zero, which indicates that the object does not provide any type information. In this case, the object may still be programmable through IDispatch, but does not provide type information for browsers, compilers, or other programming tools that access type information. This can be useful for hiding an object from browsers or for preventing early binding on an object.

Example

This code from the Lines sample file Lines.cpp implements the GetTypeInfoCountmember function for the CLinesclass (ActiveX or OLE object).

Copy Code
STDMETHODIMP
CLines::GetTypeInfoCount(UINT FAR* pctinfo)
{
*pctinfo = 1;
return NOERROR;
}

Requirements

Header oaidl.h, oaidl.idl
Library oleaut32.lib, uuid.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IDispatch