| Platform SDK: Access Control |
The LookupSids method returns the common names corresponding to each of the elements in the specified list of SIDs.
HRESULT LookupSids( ULONG cSids, PSID *rgpSids, LPDATAOBJECT *pSidNames );
Returns S_OK if successful.
Returns a nonzero error code if an error occurs.
Your implementation of LookupSids can return E_NOTIMPL if the access control editor is to determine the common names corresponding to the specified SIDs. However, if the access control editor receives any return code other than S_OK, the editor determines this information.
The client must return the common names through the data object using the following format.
// HGLOBAL containing SID_INFO_LIST returned by ISecurityInformation2::LookupSids
#define CFSTR_ACLUI_SID_INFO_LIST TEXT("CFSTR_ACLUI_SID_INFO_LIST")
// Data structures corresponding to CFSTR_ACLUI_SID_INFO_LIST
typedef struct _SID_INFO
{
PSID pSid;
PWSTR pwzCommonName;
PWSTR pwzClass; // Used for selecting icon, e.g. "User" or "Group"
PWSTR pwzUPN; // Optional pointer to a user principal
// name
} SID_INFO, *PSID_INFO;
typedef struct _SID_INFO_LIST
{
ULONG cItems;
SID_INFO aSidInfo[ANYSIZE_ARRAY];
} SID_INFO_LIST, *PSID_INFO_LIST;
Windows NT/2000: Requires Windows 2000.
Header: Declared in Aclui.h.
Access Control Editor Overview, Access Control Editor Interfaces, SID_INFO, SID_INFO_LIST, SID