Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

AssocCreateForClasses function (shellapi.h)

Retrieves an object that implements an IQueryAssociations interface.

Syntax

SHSTDAPI AssocCreateForClasses(
 [in] const ASSOCIATIONELEMENT *rgClasses,
 [in] ULONG cClasses,
 [in] REFIID riid,
 [out] void **ppv
);

Parameters

[in] rgClasses

Type: const ASSOCIATIONELEMENT*

A pointer to an array of ASSOCIATIONELEMENT structures.

[in] cClasses

Type: ULONG

The number of elements in the array pointed to by rgClasses.

[in] riid

Type: REFIID

Reference to the desired IID, normally IID_IQueryAssociations.

[out] ppv

Type: void**

When this method returns, contains the interface pointer requested in riid. This is normally IQueryAssociations.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

For systems earlier than Windows Vista, use the AssocCreate function.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shellapi.h
Library OneCore.Lib
DLL Shell32.dll
API set ext-ms-win-shell-shell32-l1-2-2 (introduced in Windows 10, version 10.0.14393)

Feedback

Was this page helpful?

Additional resources