ILFree function (shlobj_core.h)

Frees an ITEMIDLIST structure allocated by the Shell.

Syntax

void ILFree(
  [in] PIDLIST_RELATIVE pidl
);

Parameters

[in] pidl

Type: PIDLIST_RELATIVE

A pointer to the ITEMIDLIST structure to be freed. This parameter can be NULL.

Return value

None

Remarks

ILFree is often used with ITEMIDLIST structures allocated by one of the other IL functions, but it can be used to free any such structure returned by the Shell—for example, the ITEMIDLIST structure returned by SHBrowseForFolder or used in a call to SHGetFolderLocation.

Note  When using Windows 2000 or later, use CoTaskMemFree rather than ILFree. ITEMIDLIST structures are always allocated with the Component Object Model (COM) task allocator on those platforms.
 

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shlobj_core.h (include Shlobj.h)
Library Shell32.lib
DLL Shell32.dll (version 5.0 or later)

See also

ILAppendID

ILClone

ILCloneFirst

ILCombine