ASSOCIATIONELEMENT structure

Defines information used by AssocCreateForClasses to retrieve an IQueryAssociations interface for a given file association.

Syntax

typedef struct ASSOCIATIONELEMENT {
  ASSOCCLASS ac;
  HKEY       hkClass;
  PCWSTR     pszClass;
} ASSOCIATIONELEMENT;

Members

ac

Type: ASSOCCLASS

Where to obtain association data and the form the data is stored in. One of the following values from the ASSOCCLASS enumeration.

ASSOCCLASS_APP_KEY

The hkClass member provides the full registry path of an application identifier (APPID).

ASSOCCLASS_CLSID_KEY

The hkClass member provides the full registry path of a CLSID.

ASSOCCLASS_CLSID_STR

The hkClass member names a CLSID found as

                            <b>HKEY_CLASSES_ROOT</b>\<b>CLSID</b>\<i>pszClass</i>.
                        

ASSOCCLASS_PROGID_KEY

The hkClass member provides the full registry path of a ProgID.

ASSOCCLASS_SHELL_KEY

The hkClass member names a key found as

                            <b>HKEY_CLASSES_ROOT</b>\<b>SystemFileAssociations</b>\<i>hkClass</i>.
                        

ASSOCCLASS_PROGID_STR

The pszClass member names a ProgID found as

                            <b>HKEY_CLASSES_ROOT</b>\<i>pszClass</i>.
                        

ASSOCCLASS_SYSTEM_STR

The pszClass member names a key found as

                            <b>HKEY_CLASSES_ROOT</b>\<b>SystemFileAssociations</b>\<i>pszClass</i>.
                        

ASSOCCLASS_APP_STR

The APPID storing the application information is found at

                            <b>HKEY_CLASSES_ROOT</b>\<b>Applications</b>\<i>FileName</i> where <i>FileName</i> is obtained by sending <b>pszClass</b> to <a href="https://docs.microsoft.com/windows/desktop/api/shlwapi/nf-shlwapi-pathfindfilenamea">PathFindFileName</a>.

ASSOCCLASS_FOLDER

Use the association information for folders stored under

                            <b>HKEY_CLASSES_ROOT</b>\<b>Folder</b>. When this flag is set, <b>hkClass</b> and <b>pszClass</b> are ignored.

ASSOCCLASS_STAR

Use the association information stored under the

                            <b>HKEY_CLASSES_ROOT</b>\<b>*</b> subkey. When this flag is set, <b>hkClass</b> and <b>pszClass</b> are ignored.

ASSOCCLASS_FIXED_PROGID_STR

Introduced in Windows 8. Do not use the user defaults to apply the mapping of the class specified by the pszClass member.

ASSOCCLASS_PROTOCOL_STR

Introduced in Windows 8. Use the user defaults to apply the mapping of the class specified by the pszClass member; the class is a protocol.

hkClass

Type: HKEY

A registry key that specifies a class that contains association information.

pszClass

Type: PCWSTR

A pointer to the name of a class that contains association information.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Header shellapi.h

See Also

Programmatic Identifiers