Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IKnownFolder::GetPath method

Retrieves the path of a known folder as a string.

Syntax


HRESULT GetPath(
  [in]  DWORD  dwFlags,
  [out] LPWSTR *ppszPath
);

Parameters

dwFlags [in]

Type: DWORD

Flags that specify special retrieval options. This value can be 0; otherwise, one or more of the KNOWN_FOLDER_FLAG values.

ppszPath [out]

Type: LPWSTR*

When this method returns, contains the address of a pointer to a null-terminated buffer that contains the path. The calling application is responsible for calling CoTaskMemFree to free this resource when it is no longer needed.

Return value

Type: HRESULT

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

Remarks

Equivalent to SHGetKnownFolderPath

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

DLL

Shell32.dll

See also

IKnownFolder
SHGetKnownFolderPath
Known Folders Sample

 

 

Community Additions

ADD
Show:
© 2015 Microsoft