EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

IDispatch::GetTypeInfoCount method

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

Syntax


HRESULT GetTypeInfoCount(
  [out]  UINT *pctinfo
);

Parameters

pctinfo [out]

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

This method can return one of these values.

Return codeDescription
S_OK

Success.

E_NOTIMPL

Failure.

 

Remarks

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

Examples

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 * pctinfo)
{
   if (pctinfo == NULL) {
      return E_INVALIDARG;
}
   *pctinfo = 1;
   return NOERROR;
}

Requirements

IDL

OaIdl.idl

See also

IDispatch

 

 

Community-Beiträge

HINZUFÜGEN
Anzeigen:
© 2014 Microsoft