DeriveAppContainerSidFromAppContainerName function

Gets the SID of the specified profile.

Syntax

USERENVAPI HRESULT DeriveAppContainerSidFromAppContainerName(
  PCWSTR pszAppContainerName,
  PSID   *ppsidAppContainerSid
);

Parameters

pszAppContainerName

The name of the profile.

ppsidAppContainerSid

The SID for the profile. This buffer must be freed using the FreeSid function.

Return Value

This function can return one of these values.

Return code Description
S_OK
The operation completed successfully.
E_INVALIDARG
The pszAppContainerName parameter, or the ppsidAppContainerSid parameter is either NULL or not valid.

Requirements

   
Windows version Windows 8 [desktop apps only] Windows Server 2012 [desktop apps only]
Target Platform Windows
Header userenv.h
Library Userenv.lib
DLL Userenv.dll