O'Reilly logo

VB Shell Programming by J.P. Hamilton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

InfoTip Interfaces

InfoTip handlers implement two interfaces: IPersistFile and IQueryInfo. We have discussed IPersistFile several times already, most notably in Chapter 5, so we will jump straight into IQueryInfo. Let’s examine the interface definition, which is shown in Example 10.1. Table 10.1 gives a brief description of each of the methods.

Example 10-1. IQueryInfo

//------------------------------------------------------	
// IQueryInfo
//------------------------------------------------------	
    [
        uuid(00021500-0000-0000-C000-000000000046),
        helpstring("IQueryInfo Interface"),
        odl
    ]
	interface IQueryInfo : IUnknown
	{
		HRESULT GetInfoTip([in] DWORD dwFlags, 
                              [in,out] LPWSTRVB *ppwszTip);

		HRESULT GetInfoFlags([in,out] DWORD *pdwFlags);	
	}

Table 10-1. IQueryInfo

Method

Description

GetInfoFlags [a]

Retrieves the information flags for an item.

GetInfoTip

Gets the InfoTip text for the file object.

[a] This method is not currently used—not here, and according to the Platform SDK, not anywhere.

IQueryInfo is a very basic interface that contains two methods: GetInfoTip and GetInfoFlags. GetInfoFlags is not currently used by the shell, so it will not be discussed. That leaves GetInfoTip.

GetInfoTip

GetInfoTip is called by the shell to request an InfoTip string from the handler. Its syntax is:

HRESULT GetInfoTip( DWORD dwFlags, LPWSTR *ppwszTip );

with the following parameters:

dwFlags

[in] This parameter is not used currently by the shell.

ppwszTip

[in, out] The address of a wide-character ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required