SpInitUserModeContext function
The SpInitUserModeContext function creates a user-mode security context from a packed Local Security Authority (LSA)-mode context.
Syntax
NTSTATUS SpInitUserModeContext( _In_ LSA_SEC_HANDLE ContextHandle, _In_ PSecBuffer PackedContext );
Parameters
- ContextHandle [in]
-
A handle to the LSA-mode context returned from the SpInitLsaModeContext or SpAcceptLsaModeContext function.
- PackedContext [in]
-
Pointer to a SecBuffer structure that contains the serialized context data. Use the FreeContextBuffer function to free memory allocated for this structure.
Return value
If the function succeeds, return STATUS_SUCCESS.
If the function fails, return an NTSTATUS code that indicates the reason it failed. The following lists a common reason for failure and the error code that the function should return.
| Return code | Description |
|---|---|
|
Insufficient memory to create the context. |
Remarks
The SpInitUserModeContext function is called after a security context has been created by the security package, if the MappedContext parameter of the SpInitLsaModeContext or SpAcceptLsaModeContext is set to TRUE. The package-specific context data should contain the information required to determine which function resulted in the call to SpInitUserModeContext.
SSP/APs must implement the SpInitUserModeContext function; however, the actual name given to the implementation is up to the developer.
A pointer to the SpInitUserModeContext function is available in the SECPKG_USER_FUNCTION_TABLE structure received from the SpUserModeInitialize function.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
See also