CredUnmarshalCredentialW function (wincred.h)
The CredUnmarshalCredential function transforms a marshaled credential back into its original form.
BOOL CredUnmarshalCredentialW( LPCWSTR MarshaledCredential, PCRED_MARSHAL_TYPE CredType, PVOID *Credential );
Pointer to a null-terminated string that contains the marshaled credential.
Type of credential specified by MarshaledCredential.
This is one of the CRED_MARSHAL_TYPE values.
Pointer to the unmarshaled credential. If CredType returns CertCredential, the returned pointer is to a CERT_CREDENTIAL_INFO structure. If CredType returns UsernameTargetCredential, the returned pointer is to a USERNAME_TARGET_CREDENTIAL_INFO structure.
The caller should free the returned buffer using CredFree.
This function returns TRUE on success and FALSE on failure. The GetLastError function can be called to get a more specific status code. The following status code can be returned:
MarshaledCredential is not valid.
The wincred.h header defines CredUnmarshalCredential 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.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|