Düzenle

Aracılığıyla paylaş


Bind Context String Keys

A set of string keys that are used with the IBindCtx::RegisterObjectParam method to specify a bind context.

Constant Description
STR_AVOID_DRIVE_RESTRICTION_POLICY
Introduced in Windows XP SP2. Specify this bind context to permit clients of the data source to override the hidden drive letter policy and enable access to the view objects for data sources on the drives that are blocked.
Used with IShellFolder::BindToObject or IShellItem::BindToHandler.
The system supports administrator-controlled policies that hide specified drive letters to block users from accessing those drives through Windows Explorer. When this policy is active, the result is that view objects and other handlers created with the IShellFolder::CreateViewObject method will fail when called on drives that are blocked by policy.
STR_BIND_DELEGATE_CREATE_OBJECT
Introduced in Windows Vista. Specify this bind context to cause the IShellFolder::BindToObject method to use the object specified by the pbc parameter to create the target object; in this case, the object specified by the punk parameter in the IBindCtx::RegisterObjectParam call must implement the ICreateObject interface.
Used with IShellFolder::BindToObject or IShellItem::BindToHandler.
STR_BIND_FOLDER_ENUM_MODE
Introduced in Windows 7. Passed to IShellFolder::ParseDisplayName with an FOLDER_ENUM_MODE value to control the enumeration mode of the parsed item. The FOLDER_ENUM_MODE value is passed in the bind context through an object that implements IObjectWithFolderEnumMode.
Items with different enumeration modes compare canonically (SHCIDS_CANONICALONLY) different because they enumerate different sets of items.
If an item doesn't support the enumeration mode (because it isn't a folder or it doesn't provide the enumeration mode) then it is created in the default enumeration mode.
STR_BIND_FOLDERS_READ_ONLY
Introduced in Windows 7. Passed to IShellFolder::ParseDisplayName along with STR_FILE_SYS_BIND_DATA. This forces simple parsing while also probing for Desktop.ini files along the path from which to get a localized name string. This avoids probing for folders along the path, which, in a case of a folder that represents a server or a share, could take extensive time and resources. Desktop.ini files are cached in some locations, so it will be at least as efficient as probing for folders attributes and then probing for the Desktop.ini if that folder should turn ou tot be read-only.
STR_BIND_FORCE_FOLDER_SHORTCUT_RESOLVE
Introduced in Windows XP SP2. Specify this bind context to force a folder shortcut to resolve the link that points to its target.
A folder shortcut is a folder item that points to another folder item in the same namespace, using a link (shortcut) to hold the IDList of the target. The link is resolved to track the target in case it is moved or renamed. For example, the Windows XP My Network Places folder and the Windows Vista Computer folder can contain folder shortcuts created with the Add Network Location wizard. To improve performance, the IShellFolder::BindToObject method does not resolve links to network folder by default.
Used with IShellFolder::BindToObject or IShellItem::BindToHandler.
STR_DONT_PARSE_RELATIVE
Introduced in Windows XP. Specify this bind context to prevent a call to the IShellFolder::ParseDisplayName method on the Desktop folder from treating relative paths as relative to the desktop; in such a case, parsing fails when this bind context is specified.
STR_DONT_RESOLVE_LINK
Introduced in Windows Vista. Specify this bind context to instruct an IShellItem not to resolve the link target obtained when using the BHID_LinkTargetItem GUID in IShellItem::BindToHandler.
STR_FILE_SYS_BIND_DATA
Introduced in Windows XP. Specify this bind context to provide file metadata to the IShellFolder::ParseDisplayName method, which is used instead of attempting to retrieve the actual file metadata. The associated object must implement IFileSystemBindData and can optionally also implement IFileSystemBindData2. By default, the IShellFolder::ParseDisplayName method verifies that the file exists and uses the file's actual metadata to populate the ID list.
STR_FILE_SYS_BIND_DATA_WIN7_FORMAT
Introduced in Windows 8.1. Specify this bind context to indicate that the data provided in the STR_FILE_SYS_BIND_DATA bind context should be used to create an ItemID list in the Windows 7 format."
STR_GET_ASYNC_HANDLER
Introduced in Windows 7. Specify this bind context when the handler is being retrieved on the same thread as the UI. Any memory-intensive activities such as those that involve disk or network access should be avoided.
STR_GPS_BESTEFFORT
Introduced in Windows Vista. Specify this bind context when requesting an IPropertySetStorage or IPropertyStore handler. This value is used with IShellFolder::BindToObject. See the GPS_BESTEFFORT flag for more information.
STR_GPS_DELAYCREATION
Introduced in Windows Vista. Specify this bind context when requesting an IPropertySetStorage or IPropertyStore handler. This value is used with IShellFolder::BindToObject. See the GPS_DELAYCREATION flag for more information.
STR_GPS_FASTPROPERTIESONLY
Introduced in Windows Vista. Specify this bind context when requesting an IPropertySetStorage or IPropertyStore handler. This value is used with IShellFolder::BindToObject. See the GPS_FASTPROPERTIESONLY flag for more information.
STR_GPS_HANDLERPROPERTIESONLY
Introduced in Windows Vista. Specify this bind context when requesting an IPropertySetStorage or IPropertyStore handler. This value is used with IShellFolder::BindToObject. See the GPS_HANDLERPROPERTIESONLY flag for more information.
STR_GPS_NO_OPLOCK
Introduced in Windows 7. Specify this bind context when requesting an IPropertySetStorage or IPropertyStore handler. This value is used with IShellFolder::BindToObject. See the GPS_NO_OPLOCK flag for more information.
STR_GPS_OPENSLOWITEM
Introduced in Windows Vista. Specify this bind context when requesting an IPropertySetStorage or IPropertyStore handler. This value is used with IShellFolder::BindToObject. See the GPS_OPENSLOWITEM flag for more information.
STR_IFILTER_FORCE_TEXT_FILTER_FALLBACK
Windows Vista only. Specify this bind context to cause a call to the IShellFolder::BindToObject method that requests the IFilter interface for a file system object to return a text filter if no other filter is available. This value is not defined as of Windows 7.
STR_IFILTER_LOAD_DEFINED_FILTER
Windows Vista only. Specify this bind context to cause a call to the IShellFolder::BindToObject method that requests the IFilter interface for a file system object to not return a fallback filter if no registered filter could be found.
STR_INTERNAL_NAVIGATE
Introduced in Windows Vista. Specify this bind context to enable loading of the history from a stream for an internal navigation when the IPersistHistory::LoadHistory method is called. An internal navigation is a navigation within the same view.
STR_INTERNETFOLDER_PARSE_ONLY_URLMON_BINDABLE
Introduced in Windows 7. Specify this bind context with STR_PARSE_PREFER_FOLDER_BROWSING when the client wants the Internet Shell folder handlers to generate an IDList for any valid URL if a DAV-type folder cannot be created for that URL. The URL is not verified to exist; only its syntax is checked and that it has a registered protocol handler.
STR_ITEM_CACHE_CONTEXT
Introduced in Windows 7. Specify this bind context to instruct implementations of IShellFolder::ParseDisplayName and IPersistFolder3::InitializeEx to cache memory-intensive helper objects that can exist across instantiations of Shell items instead of recreating these objects each time that a Shell item is created. The associated object is another bind context object, initially empty. This should result in a separate bind context object, which is accessed through IBindCtx::GetObjectParam or IBindCtx::Register.ObjectParam.
A caller must opt into this behavior by providing this bind context parameter when calling SHCreateItemFromParsingName. By doing so, you optimize the behavior of binding to multiple parsing names in succession. The lifetime of the bind context object should span multiple instances of Shell items and their individual bind contexts.
STR_NO_VALIDATE_FILENAME_CHARS
Introduced in Windows Vista. Specify this bind context to allow invalid file name characters to appear in file names. By default, a call to the IShellFolder::ParseDisplayName method rejects characters that are illegal in file names. This bind context is meaningful only in conjunction with the STR_FILE_SYS_BIND_DATA bind context.
STR_PARSE_ALLOW_INTERNET_SHELL_FOLDERS
Introduced in Windows Vista. Specify this bind context to enable a call to the IShellFolder::ParseDisplayName method on the Desktop folder to parse URLs. If this bind context is specified, it overrides STR_PARSE_PREFER_WEB_BROWSING.
STR_PARSE_AND_CREATE_ITEM
Introduced in Windows 7. Specify this bind context to instruct a data source's implementation of IShellFolder::ParseDisplayName to optimize the behavior of SHCreateItemFromParsingName.
Normally, SHCreateItemFromParsingName performs two binding operations on the name to be parsed: one through and one to IShellFolder::ParseDisplayName and one to create the Shell item. When the STR_PARSE_AND_CREATE_ITEM bind context is supported, the second bind is avoided by creating the Shell item during the IShellFolder::ParseDisplayName bind and storing the Shell item through IParseAndCreateItem::SetItem. SHCreateItemFromParsingName then uses the stored Shell item rather than creating one.
This parameter applies to the last element of the name that is parsed. For instance, in the name "C:\Folder1\File.txt, the data applies to File.txt.
STR_PARSE_DONT_REQUIRE_VALIDATED_URLS
Windows Vista only. Specify that, when parsing a URL, this bind context should not require the URL to exist before generating an IDList for it. Specify this bind context along with STR_PARSE_PREFER_FOLDER_BROWSING when the client desires that the Internet Shell folder handlers generate an IDList for the URL if a DAV folder cannot be created for the given URL.
STR_PARSE_PARTIAL_IDLIST
Introduced in Windows Vista. Specify this bind context to pass the original item that is being re-parsed when that item is stored as a IShellItem object that also implements the IParentAndItem interface. Before Windows 7 this value was not defined in a header file. It could be defined by the caller or passed as its string value of L"ParseOriginalItem". As of Windows 7, the value is defined in Shlobj.h. Note that this is a different header than the other STR constants.
STR_PARSE_PREFER_FOLDER_BROWSING
Introduced in Windows XP. Specify this bind context to enable a call to the IShellFolder::ParseDisplayName method on the Desktop folder to parse URLs as if they were folders. Use this bind context to bind to a WebDAV server.
STR_PARSE_PREFER_WEB_BROWSING
Introduced in Windows Vista. Specify this bind context to prevent a call to the IShellFolder::ParseDisplayName method on the Desktop folder form parsing URLs. This bind context can be overridden by STR_PARSE_ALLOW_INTERNET_SHELL_FOLDERS.
STR_PARSE_PROPERTYSTORE
Introduced in Windows Vista. Specify this bind context to override the default property store used by the IShellFolder::ParseDisplayName method, and use the property store specified as the bind parameter instead. Applies to delegate folders.
STR_PARSE_SHELL_PROTOCOL_TO_FILE_OBJECTS
Introduced in Windows XP SP2. Specify this bind context to enable a call to the IShellFolder::ParseDisplayName method on the Desktop folder to use the "shell:" prefix notation to access files.
STR_PARSE_SHOW_NET_DIAGNOSTICS_UI
Introduced in Windows Vista. Specify this bind context to cause a call to the IShellFolder::ParseDisplayName method to display the network diagnostics dialog if the parsing of a network path fails.
STR_PARSE_SKIP_NET_CACHE
Introduced in Windows Vista. Specify this bind context to cause a call to the IShellFolder::ParseDisplayName method to skip checking the network shares cache and contact the network server directly. Information about network shares is cached to improve performance, and IShellFolder::ParseDisplayName checks this cache by default.
STR_PARSE_TRANSLATE_ALIASES
Introduced in Windows XP. Specify this bind context to pass parsed properties to the IShellFolder::ParseDisplayName method for a delegate namespace. The namespace can use the passed properties instead of attempting to parse the name itself.
STR_PARSE_WITH_PROPERTIES
Windows Vista only. A parsing bind context that is used to pass a set of properties and the item's name when calling IShellFolder::ParseDisplayName. The object in the bind context implements IPropertyStore and is retrieved by calling IBindCtx::GetObjectParam.
DBFolder is a Shell data source that represents items in search results and query-based views. DBFolder retrieves these items by querying the Windows Search system. Items in the search results are identified through a protocol scheme, for example "file:" or "mapi:". DBFolder provides the behavior for these items by delegating to Shell data sources that are created for these protocols. See Developing Protocol Handler Add-ins for more information.
When DBFolder delegates its parsing operation to the Shell data sources that support Windows Search protocols, this bind context provides access to values that were returned in the query result for that item. This includes the following:

This bind context can also be used to parse a DBFolder item if a client has a set of properties that define the item. In this case an empty name should be passed to IShellFolder::ParseDisplayName.
Before Windows 7, this value was not defined in a header file. It could be defined by the caller or passed as its string value: L"ParseWithProperties". As of Windows 7, the value is defined in Shlobj.h. Note that this is a different header than where the other STR constants are defined.
STR_PROPERTYBAG_PARAM
Introduced in Windows 8. Specify this bind context to indicate that the bind context parameter is a property bag (IPropertyBag) used to pass VARIANT values in the bind context. See the Remarks section for further details.
STR_SKIP_BINDING_CLSID
Introduced in Windows XP. Specify this bind context to cause calls to the IShellFolder::ParseDisplayName or IShellFolder::BindToObject methods to ignore a particular Shell namespace extension when parsing or binding. The CLSID of the namespace to ignore is provided by the IPersist::GetClassID method of the bind parameter.
Note: Introduced in Windows 2000 SP3, this value was defined in Shlobj.h until Windows XP, when it was moved to Shobjidl.h.
STR_TRACK_CLSID
Not used.

Remarks

Bind contexts are used to pass optional parameters to functions that have an IBindCtx* parameter. Those parameters are expressed as COM objects and might implement interfaces that are used to model the parameter data. Some bind contexts represent a Boolean value, where TRUE indicates an object that implements only IUnknown and FALSE indicates no object is present.

IShellFolder::ParseDisplayName, IShellFolder::BindToObject and IShellItem::BindToHandler take a bind context and you can pass them parameters through that bind context.

Some bind contexts are specific to a certain data source implementations or handler types.

Bind context parameters are defined for use with a specific function or method.

When requesting a property store through IShellFolder, you can specify the equivalent of GPS_DEFAULT by passing in a null IBindCtx parameter. You can also specify the equivalent of GPS_READWRITE by passing a mode of STGM_READWRITE | STGM_EXCLUSIVE in the bind context.

The property bag specified by the STR_PROPERTYBAG_PARAM bind context object contains additional values that you can access with the IPropertyBag::Read and IPropertyBag::Write methods.

Property name Type Description
STR_ENUM_ITEMS_FLAGS VT_UI4 Introduced in Windows 8. Specifies a SHCONTF value to be passed to IShellFolder::EnumObjects when you call IShellItem::BindToHandler with BHID_EnumItems.
STR_PARSE_EXPLICIT_ASSOCIATION_SUCCESSFUL VT_BOOL Introduced in Windows 7. The IShellFolder::ParseDisplayName method sets this property to tell the caller that the returned IDList was bound to the ProgID specified with STR_PARSE_WITH_EXPLICIT_PROGID or the application specified with STR_PARSE_WITH_EXPLICIT_ASSOCAPP. When STR_PARSE_EXPLICIT_ASSOCIATION_SUCCESSFUL is absent, the ProgID or application was not bound into the IDList.
STR_PARSE_WITH_EXPLICIT_ASSOCAPP VT_BSTR Introduced in Windows 7. Specify this property to cause a call to the IShellFolder::ParseDisplayName method to return an IDList bound to the file type association handler for the application.
STR_PARSE_WITH_EXPLICIT_PROGID VT_BSTR Introduced in Windows 7. Specify this property to cause a call to the IShellFolder::ParseDisplayName method to return an IDList bound to the file association handler of the provided ProgID.

 

See the Parsing With Parameters Sample for an example of the use of bind context values.

Requirements

Requirement Value
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2008 R2 [desktop apps only]
Header
Shobjidl.h
IDL
Shobjidl.idl