spExportSecurityContextFn 回呼函式 (ntsecpkg.h)

將安全性內容匯出至另一個進程。

SpExportSecurityContext 函式是 Security Support Provider InterfaceExportSecurityContext 函式的分派函式。

語法

SpExportSecurityContextFn Spexportsecuritycontextfn;

NTSTATUS Spexportsecuritycontextfn(
  [in]  LSA_SEC_HANDLE phContext,
  [in]  ULONG fFlags,
  [out] PSecBuffer pPackedContext,
  [out] PHANDLE pToken
)
{...}

參數

[in] phContext

要匯出之安全性內容的句柄。

[in] fFlags

選擇性。 指定內容重複選項。 下表列出 Sspi.h 中定義的有效值。

意義
SECPKG_CONTEXT_EXPORT_RESET_NEW
新內容會重設為初始狀態。
SECPKG_CONTEXT_EXPORT_DELETE_OLD
匯出期間會刪除舊內容。

[out] pPackedContext

包含串行化內容之 SecBuffer 結構的指標。 資源應該使用 AllocateClientBuffer 函 式進行配置,並使用 FreeContextBuffer 函式釋放呼叫端。

[out] pToken

選擇性。 接收內容令牌之句柄的指標。

傳回值

如果函式成功,請傳回STATUS_SUCCESS。

如果函式失敗,則傳回 NTSTATUS 程式代碼,指出失敗的原因。

備註

若要匯入先前導出的安全性內容,請使用 SpImportSecurityContext 函式。

SSP/AP 必須實作 SpExportSecurityContext 函式;不過,提供給實作的實際名稱是由開發人員決定。

SpExportSecurityContext 函式的指標可在從 SpUserModeInitialize 函式收到的SECPKG_USER_FUNCTION_TABLE結構中使用。

規格需求

需求
最低支援的用戶端 Windows XP [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2003 [僅限桌面應用程式]
目標平台 Windows
標頭 ntsecpkg.h

另請參閱

SECPKG_USER_FUNCTION_TABLE

SpImportSecurityContext

SpUserModeInitialize