AssocSystemElement

Instances of the system type of assocation element are created by passing the corresponding CLSID to the AssocCreateElement function:

CLSID_AssocSystemElement {A6C4BAAD-4AF5-4191-8685-C2C8953A148C}

As with all assocation elements, system elements implement the IAssociationElement, IObjectWithQuerySource and IPersistString2 interfaces. However, all the methods of a system element are the same as for the basic shell element except for SetString and GetClassID. In effect, a system element is just a shell element with a different query source.

Initialisation String

When a system element is initialised through its SetString method, the registry key that is used as the query source is:

Key: HKEY_CLASSES_ROOT\SystemFileAssociations\InitString

in which InitString is whatever is passed to the SetString method.

Usage

In ordinary usage, a system element exists within a QueryAssociations object, also called an association array. One way to get a system element created in an association array is to call the AssocCreateForClasses function and specify either ASSOCCLASS_SHELL_KEY or ASSOCCLASS_SYSTEM_STR as the type for one or more association elements.