CredIsProtectedW function (wincred.h)

The CredIsProtected function specifies whether the specified credentials are encrypted by a previous call to the CredProtect function.

Syntax

BOOL CredIsProtectedW(
  [in]  LPWSTR               pszProtectedCredentials,
  [out] CRED_PROTECTION_TYPE *pProtectionType
);

Parameters

[in] pszProtectedCredentials

A pointer to a null-terminated string that specifies the credentials to test.

[out] pProtectionType

A pointer to a value from the CRED_PROTECTION_TYPE enumeration that specifies whether the credentials specified in the pszProtectedCredentials parameter are protected.

Return value

TRUE if the function succeeds; otherwise, FALSE.

For extended error information, call the GetLastError function.

Remarks

Note

The wincred.h header defines CredIsProtected 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.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wincred.h
Library Advapi32.lib
DLL Advapi32.dll