Skip to content

Latest commit

 

History

History
90 lines (71 loc) · 3.4 KB

nf-wincred-credfindbestcredentiala.md

File metadata and controls

90 lines (71 loc) · 3.4 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wincred.CredFindBestCredentialA
CredFindBestCredentialA function (wincred.h)
Searches the Credentials Management (CredMan) database for the set of generic credentials that are associated with the current logon session and that best match the specified target resource. (ANSI)
CredFindBestCredentialA
wincred/CredFindBestCredentialA
security\credfindbestcredential.htm
security
b39e3167-dd63-4b81-b850-f3117be348a5
12/05/2018
CredFindBestCredential, CredFindBestCredential function [Security], CredFindBestCredentialA, CredFindBestCredentialW, security.credfindbestcredential, wincred/CredFindBestCredential, wincred/CredFindBestCredentialA, wincred/CredFindBestCredentialW
wincred.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
CredFindBestCredentialW (Unicode) and CredFindBestCredentialA (ANSI)
Advapi32.lib
Advapi32.dll
Windows
19H1
CredFindBestCredentialA
wincred/CredFindBestCredentialA
c++
APIRef
kbSyntax
DllExport
Advapi32.dll
API-MS-Win-DownLevel-AdvApi32-l2-1-1.dll
sechost.dll
API-MS-Win-Security-credentials-l1-1-0.dll
CredFindBestCredential
CredFindBestCredentialA
CredFindBestCredentialW

CredFindBestCredentialA function

-description

The CredFindBestCredential function searches the Credentials Management (CredMan) database for the set of generic credentials that are associated with the current logon session and that best match the specified target resource.

-parameters

-param TargetName [in]

A pointer to a null-terminated string that contains the name of the target resource for which to find credentials.

-param Type [in]

The type of credentials to search for. Currently, this function supports only CRED_TYPE_GENERIC.

-param Flags [in]

Reserved.

-param Credential [out]

The address of a pointer to a CREDENTIAL structure that specifies the set of credentials this function finds.

When you have finished using this structure, free it by calling the CredFree function.

-returns

If the function succeeds, it returns TRUE.

If the function fails, it returns FALSE. To get extended error information, call GetLastError.

-remarks

Note

The wincred.h header defines CredFindBestCredential as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.