Band objects can send commands to their container through the container's IOleCommandTarget interface. To obtain the interface pointer, call the container's IInputObjectSite::QueryInterface method and ask for IID_IOleCommandTarget. You then send commands to the container with IOleCommandTarget::Exec. The command group is CGID_DeskBand. When a band object's GetBandInfo method is called, the container uses the dwBandID parameter to assign the band object an identifier that is used for three of the commands. Four IOleCommandTarget::Exec command identifiers (IDs) are supported.
DBID_BANDINFOCHANGED
The band's information has changed. Set the pvaIn parameter to the band identifier that was received in the most recent call to GetBandInfo. The container will call the band object's GetBandInfo method to request the updated information.
DBID_MAXIMIZEBAND
Maximize the band. Set the pvaIn parameter to the band identifier that was received in the most recent call to GetBandInfo.
DBID_SHOWONLY
Turn other bands in the container on or off. Set the pvaIn parameter to the VT_UNKNOWN type with one of the following values:
Value Description
pUnk A pointer to the band object's IUnknown interface. All other desk bands will be hidden.
0 Hide all desk bands.
1 Show all desk bands.
create a COM object in the explorer.exe process using SHLoadInProc. When the object is created, create the band and add it.
Note This function is available through Windows XP SP2 and Windows Server 2003. It is not available in later versions of Windows such as Windows Vista.
return S_OK;
}
The Shell automatically unloads a DLL when the DLL's usage count is zero, but only after the DLL has not been used for a period of time. This inactive period might be unacceptably long at times, especially when a Shell extension DLL is being debugged. For operating systems prior to Windows 2000, you can shorten the inactive period by adding the following information to the registry.