3 out of 5 rated this helpful Rate this topic

SHGetSpecialFolderLocation function

Retrieves a pointer to the ITEMIDLIST structure of a special folder.

Syntax

HRESULT SHGetSpecialFolderLocation(
  __in   HWND hwndOwner,
  __in   int nFolder,
  __out  PIDLIST_ABSOLUTE *ppidl
);

Parameters

hwndOwner [in]

Type: HWND

Reserved.

nFolder [in]

Type: int

A CSIDL value that identifies the folder of interest.

ppidl [out]

Type: PIDLIST_ABSOLUTE*

A PIDL specifying the folder's location relative to the root of the namespace (the desktop). It is the responsibility of the calling application to free the returned IDList by using CoTaskMemFree.

Return value

Type: HRESULT

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

Remarks

With Windows 2000, this function is superseded by SHGetFolderLocation.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Shlobj.h

Library

Shell32.lib

DLL

Shell32.dll (version 4.0 or later)

See also

SHGetSpecialFolderPath

 

 

Send comments about this topic to Microsoft

Build date: 9/7/2011

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