This function retrieves the attributes of a credential, such as the name associated with the credential.
At a Glance
Header file: | Sspi.h |
Windows CE versions: | 2.10 and later |
Syntax
SECURITY_STATUS QueryCredentialsAttributes(
PCredHandle phCredential, ULONG ulAttribute, PVOID pBuffer );
Parameters
phCredential
Pointer to the handle to the credentials to be queried.
ulAttribute
Specifies the attribute to query. This parameter must be SECPKG_CRED_ATTR_NAMES.
pBuffer
Pointer to a buffer that receives the requested attribute. For the SECPKG_CRED_ATTR_NAMES attribute, pBuffer must point to a SecPkgCredentials_Names structure.
Return Values
SEC_E_OK indicates success.
Upon failure, one of the error values described in the following table is returned.
Value | Description |
SEC_E_INVALID_HANDLE | The handle passed to the function is invalid. |
SEC_E_INSUFFICIENT_MEMORY | Insufficient memory. |
Remarks
The QueryCredentialsAttributes function allows a customer of the security services to determine the name associated with the specified credentials.
The caller must allocate the structure pointed to by the pBuffer parameter. The security provider allocates the buffer for any pointer returned in the pBuffer structure. The caller can call the FreeContextBuffer function to free any pointers allocated by the security provider.
See Also