Compartir a través de


QueryCredentialsAttributes

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function retrieves the attributes of a credential, such as the name associated with the credential.

Syntax

SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributes( 
  PCredHandle phCredential, 
  ULONG ulAttribute, 
  void SEC_FAR* pBuffer 
);

Parameters

  • phCredential
    [in] Pointer to a CredHandle structure containing the handle to the credentials to query. For information on CredHandle, see SSPI Handles.
  • ulAttribute
    [in] The attribute to query. This parameter must be SECPKG_CRED_ATTR_NAMES.
  • pBuffer
    [out] Pointer to a buffer containing the requested attribute. For the SECPKG_CRED_ATTR_NAMES attribute, pBuffer must indicate a SecPkgCredentials_Names structure.

Return Value

Returns SEC_E_OK to indicate success. The following table shows the possible error values.

Value Description

SEC_E_INVALID_HANDLE

The handle passed to the function is invalid.

SEC_E_INSUFFICIENT_MEMORY

Insufficient memory.

Remarks

This 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 retrieved in the pBuffer structure. The caller can call the FreeContextBuffer function to free any pointers allocated by the security provider.

Requirements

Header security.h, sspi.h
Library secur32.lib
Windows Embedded CE Windows CE 2.10 and later
Windows Mobile Pocket PC 2000 and later, Smartphone 2002 and later

See Also

Reference

FreeContextBuffer
SecPkgCredentials_Names