Expand Minimize

SpExportSecurityContext function

Exports a security context to another process.

The SpExportSecurityContext function is the dispatch function for the ExportSecurityContext function of the Security Support Provider Interface.

Syntax


NTSTATUS SpExportSecurityContext(
  _In_   LSA_SEC_HANDLE phContext,
  _In_   ULONG fFlags,
  _Out_  PSecBuffer pPackedContext,
  _Out_  PHANDLE pToken
);

Parameters

phContext [in]

A handle to the security context to export.

fFlags [in]

Optional. Specifies context duplication options. The following table lists the valid values which are defined in Sspi.h.

ValueMeaning
SECPKG_CONTEXT_EXPORT_RESET_NEW

New context is reset to initial state.

SECPKG_CONTEXT_EXPORT_DELETE_OLD

Old context is deleted during export.

 

pPackedContext [out]

Pointer to a SecBuffer structure containing the serialized context. Resources should be allocated using the AllocateClientBuffer function, and freed by the caller using the FreeContextBuffer function.

pToken [out]

Optional. Pointer to a handle that receives the context's token.

Return value

If the function succeeds, return STATUS_SUCCESS.

If the function fails, return an NTSTATUS code that indicates the reason it failed.

Remarks

To import a previously exported security context use the SpImportSecurityContext function.

SSP/APs must implement the SpExportSecurityContext function; however, the actual name given to the implementation is up to the developer.

A pointer to the SpExportSecurityContext 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

Ntsecpkg.h

See also

SECPKG_USER_FUNCTION_TABLE
SpImportSecurityContext
SpUserModeInitialize

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.