---
name: "SHGetFolderPathW"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/SHGetFolderPathW"
---

# SHGetFolderPathW(3w)

## NAME

**SHGetFolderPathW** (SHELL32.@)

## SYNOPSIS

HRESULT SHGetFolderPathW\
  (\
   HWND   *hwndOwner*,\
   int    *nFolder*,\
   HANDLE *hToken*,\
   DWORD  *dwFlags*,\
   LPWSTR *pszPath*\
  )

## PARAMS

*hwndOwner* **\[In\]**  owner window.

*nFolder* **\[In\]**  **CSIDL** identifying the folder.

*hToken* **\[In\]**  access token.

*dwFlags* **\[In\]**  which path to return.

*pszPath* **\[Out\]**  converted path.

## DESCRIPTION

Convert *nFolder* to path.

## RETURNS

**Success:** **S\_OK**

**Failure:** standard **HRESULT** error codes.

## NOTES

Most values can be overridden in either HKCUsoftWindowssed in **NT4** and earlier systems. Beginning with Windows(tm) **2000**, the **"User Shell Folders"** key is used, so changes made to it are made to the former key too. This synchronization is done on-demand: not until someone requests the value of one of these paths (by calling one of the SHGet functions) is the value synchronized. Furthermore, the **HKCU** paths take precedence over the **HKLM** paths.

## IMPLEMENTATION

Declared in **"shlobj.h"**.

Implemented in **"dlls/shell32/shellpath.c"**.

Debug channel **"shell"**.
