The QueryCredentialsAttributes function retrieves the attributes of a credential, such as the name associated with the credential.
SECURITY_STATUS QueryCredentialsAttributes(
PCredHandle phCredential, // credential to query
ULONG ulAttribute, // attribute to query
PVOID pBuffer // buffer that receives attributes
);
If the function succeeds, the return value is SEC_E_OK.
If the function fails, the return value may be one of the following error codes.
Value | Meaning |
---|---|
SEC_E_INVALID_HANDLE | The handle passed to the function is invalid. |
SEC_E_INSUFFICIENT_MEMORY | Insufficient memory. |
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.