This topic has not yet been rated - Rate this topic

AssocCreate function

Applies to: desktop apps only

Returns a pointer to an IQueryAssociations object.

Syntax

HRESULT AssocCreate(
  __in   CLSID clsid,
  __in   REFIID riid,
  __out  void *ppv
);

Parameters

clsid [in]

Type: CLSID

The CLSID of the object that exposes the interface. This parameter must be set to CLSID_QueryAssociations, which is defined in Shlguid.h.

riid [in]

Type: REFIID

Reference to the IID IID_IQueryAssociations, which is defined in Shlguid.h.

ppv [out]

Type: void*

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

Return value

Type: HRESULT

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

Remarks

As of Windows Vista, AssocCreateForClasses is preferred to AssocCreate.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP

Minimum supported server

Windows 2000 Server

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 5.0 or later)

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ