Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Retrieves the path of a known folder as a string.
HRESULT GetPath(
[in] DWORD dwFlags,
[out] LPWSTR *ppszPath
);
[in] dwFlags
Type: DWORD
Flags that specify special retrieval options. This value can be 0; otherwise, one or more of the KNOWN_FOLDER_FLAG values.
[out] ppszPath
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.
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Equivalent to SHGetKnownFolderPath
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h (include Shobjidl.h) |
DLL | Shell32.dll |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today