IDispatch::GetTypeInfoCount Home
This page is specific to:.NET Framework Version:1.12.03.03.54.0
Component Automation
IDispatch::GetTypeInfoCount

Retrieves the number of type information interfaces that an object provides (either 0 or 1).

HRESULT GetTypeInfoCount(  
  unsigned int FAR*  pctinfo 
);
Parameter

pctinfo

Points 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

The return value obtained from the returned HRESULT is one of the following:

Return value

Meaning

S_OK

Success.

E_NOTIMPL

Failure.

Comments

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 or a VTBL, but does not provide run-time type information for browsers, compilers, or other programming tools that access type information. This can be useful for hiding an object from browsers.

Example

This code from the Lines sample file Lines.cpp implements the GetTypeInfoCount member function for the CLines class (ActiveX or OLE object).

STDMETHODIMP
CLines::GetTypeInfoCount(UINT FAR* pctinfo)
{
   if (pctinfo == NULL) {
      return E_INVALIDARG;
}
   *pctinfo = 1;
   return NOERROR;
}
See Also

Concepts

Reference

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View