Platform SDK: Logon Authentication |
The ImportSecurityContext function imports a security context exported into the current process by ExportSecurityContext.
SECURITY_STATUS SEC_Entry ImportSecurityContext( PSECURITY_STRING *pszPackage, PSecBuffer pPackedContext, void SEC_FAR *pToken, PCtxtHandle phContext );
If the function succeeds, the return value is SEC_E_OK.
If the function fails, the return value can be one of the following error codes.
Value | Meaning |
---|---|
SEC_E_UNKNOWN_CREDENTIALS | The credentials supplied to the package were not recognized. |
SEC_E_NO_CREDENTIALS | No credentials are available in the security package. |
SEC_E_NOT_OWNER | The caller of the function does not have the necessary credentials. |
SEC_E_INSUFFICIENT_MEMORY | Not enough memory is available to complete the request. |
SEC_E_INTERNAL_ERROR | The Local Security Authority (LSA) cannot be contacted. |
The prototype for this function can be found in sspi.h.
Windows NT/2000: Requires Windows NT 3.51 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Sspi.h; include Security.h.
Library: Use Secur32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.