Exposes methods that simplify the process of retrieving information stored in the registry in association with defining a file type or protocol and associating it with an application.
The IQueryAssociations interface has these methods.
|IQueryAssociations::GetData||Searches for and retrieves file or protocol association-related binary data from the registry.|
|IQueryAssociations::GetEnum||This method is not implemented.|
|IQueryAssociations::GetKey||Searches for and retrieves a file or protocol association-related key from the registry.|
|IQueryAssociations::GetString||Searches for and retrieves a file or protocol association-related string from the registry.|
|IQueryAssociations::Init||Initializes the IQueryAssociations interface and sets the root key to the appropriate ProgID.|
A complete registry path or HKEY value is not required. Instead, you can retrieve information based on criteria such as the file name extension or executable name. For a discussion of file associations, see File Types.
To use this interface, you must first retrieve a pointer to it. Typically, you retrieve an QueryInterface pointer by calling a Shell object's IShellFolder::GetUIObjectOf method. You can also retrieve an interface pointer by calling AssocCreate (set clsid to CLSID_QueryAssociations). Initialize the interface with IQueryAssociations::Init. This method sets the root key that will be used when you call any of the remaining three methods to retrieve information from the registry. They will look only below the root key. You must release the interface when you no longer need it.
The IQueryAssociations interface is useful if you need to repeatedly query the registry for information. Once the interface is initialized, the overhead of calling the various methods is relatively small. There are also several related functions, listed in the See Also section, that allow you to retrieve the same information from the registry with a single function call. While they are simpler to use, they cause the overhead of creating and initializing IQueryAssociations each time they are called. Because of this, they are best suited for single use.
|Minimum supported client||Windows 2000 Professional, Windows XP [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|