IDispatch::GetTypeInfoCount

pctinfo)
unsigned int FAR* pctinfo

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

Parameters

pctinfo

Points to location that receives the number of type information interfaces that the object provides. If the object provides type information, this number is 1; otherwise the number is 0.

Return Value

The SCODE obtained from the returned HRESULT is one of the following:

SCODE
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, but does not provide type information for browsers, compilers, or other programming tools that access type information. This may 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 GetTypeInfoCount member function for the CLines class. (OLE Automation object.)

STDMETHODIMP

CLines::GetTypeInfoCount(UINT FAR* pctinfo)

{

  • pctinfo = 1;

return NOERROR;

}

See Also

CreateStdDispatch

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database