GetAppContainerFolderPath function
Gets the path of the local app data folder for the specified app container.
Syntax
HRESULT WINAPI GetAppContainerFolderPath( _In_ PCWSTR pszAppContainerSid, _Out_ PWSTR *ppszPath );
Parameters
- pszAppContainerSid [in]
-
A pointer to the SID of the app container.
- ppszPath [out]
-
The address of a pointer to a string that, when this function returns successfully, receives the path of the local folder. It is the responsibility of the caller to free this string when it is no longer needed by calling the CoTaskMemFree function.
Return value
This function returns an HRESULT code, including but not limited to the following:
| Return code | Description |
|---|---|
|
The operation completed successfully. |
|
The pszAppContainerSid or ppszPath parameter is NULL. |
Remarks
The path retrieved through this function is the same path that you would get by calling the SHGetKnownFolderPath function with FOLDERID_LocalAppData.
If a thread token is set, this function uses the app container for the current user. If no thread token is set, this function uses the app container associated with the process identity.
Requirements
|
Minimum supported client |
Windows 8 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2012 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also