Go to Home Page

Creates a specified interface on a shell info tip


HRESULT WINAPI CreateInfoTipFromItem2 (
    IShellFolder2* psf,
    ITEMIDLIST* pidl,
    PROPERTYKEY* pPropKey,
    LPCWSTR pText,
    REFIID riid,
    PVOID* ppv


The folder containing the item described by pidl
pidl of item to create the info tip for
Property value to use as the info tip text
Info tip text
Id of the interface to return
Pointer to a pointer that receives the interface

Return Value

S_OK on success, otherwise a standard COM error


Only one of pText and pPropKey can be specified. If pText is given, psf, pidl and pPropKey are ignored and pText is used as the infotip's text. Otherwise psf, pidl and pPropKey may not be NULL and the text for the info tip comes from psf->GetDetailsEx(pidl, pPropKey, &varText).

riid can be IQueryInfo, IParentAndItem or the undocumented ICustomizeInfoTip which is defined as the following:

struct ICustomizeInfoTip : public IUnknown
    // copies text to an internal buffer that seems to go unused.
    // The text isn't used to prefix tips returned from IQueryInfo::GetInfoTip
    virtual STDMETHODIMP SetPrefixText(LPCWSTR text);

    // sets additional properties to be included in the info-tip text
    // 8 is the maximum number of extra props allowed
    // any previous values set by this function are overwritten
    // when you call it
    virtual STDMETHODIMP SetExtraProperties(PROPERTYKEY* pPropArray, UINT numElems);

This function is also known as _CreateInfoTipFromItem2@24.