CredUnmarshalCredential function
The CredUnmarshalCredential function transforms a marshaled credential back into its original form.
Syntax
BOOL CredUnmarshalCredential( _In_ LPCTSTR MarshaledCredential, _Out_ PCRED_MARSHAL_TYPE CredType, _Out_ PVOID *Credential );
Parameters
- MarshaledCredential [in]
-
Pointer to a null-terminated string that contains the marshaled credential.
- CredType [out]
-
Type of credential specified by MarshaledCredential. This is one of the CRED_MARSHAL_TYPE values.
- Credential [out]
-
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.
Return value
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:
ERROR_INVALID_PARAMETER
MarshaledCredential is not valid.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
CredUnmarshalCredentialW (Unicode) and CredUnmarshalCredentialA (ANSI) |
See also
- CredFree
- CredMarshalCredential
- CRED_MARSHAL_TYPE
- CERT_CREDENTIAL_INFO
- GetLastError
- USERNAME_TARGET_CREDENTIAL_INFO