Skip to content

Latest commit

 

History

History
108 lines (83 loc) · 3.11 KB

nc-ntsecpkg-spgetcontexttokenfn.md

File metadata and controls

108 lines (83 loc) · 3.11 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NC:ntsecpkg.SpGetContextTokenFn
SpGetContextTokenFn (ntsecpkg.h)
Obtains the token to impersonate.
SpGetContextToken
SpGetContextToken callback function [Security]
SpGetContextTokenFn
SpGetContextTokenFn callback
_ssp_spgetcontexttoken
ntsecpkg/SpGetContextToken
security.spgetcontexttoken
security\spgetcontexttoken.htm
security
d2e6b57d-751d-4f07-b05b-6d3aabd60650
12/05/2018
SpGetContextToken, SpGetContextToken callback function [Security], SpGetContextTokenFn, SpGetContextTokenFn callback, _ssp_spgetcontexttoken, ntsecpkg/SpGetContextToken, security.spgetcontexttoken
ntsecpkg.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Windows
19H1
SpGetContextTokenFn
ntsecpkg/SpGetContextTokenFn
c++
APIRef
kbSyntax
UserDefined
Ntsecpkg.h
SpGetContextToken

SpGetContextTokenFn callback function

-description

Obtains the token to impersonate. The SpGetContextToken function is used by the SSPI ImpersonateSecurityContext function to obtain the token to impersonate.

-parameters

-param ContextHandle [in]

A handle to the context to impersonate.

-param ImpersonationToken [out]

Pointer that receives a handle to the token for the specified context. Return the handle to the token without first duplicating the handle or the token.

-returns

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
SEC_E_INVALID_HANDLE
The handle is not valid.

-remarks

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

A pointer to the SpGetContextToken function is available in the SECPKG_USER_FUNCTION_TABLE structure received from the SpUserModeInitialize function.

-see-also

ImpersonateSecurityContext

SECPKG_USER_FUNCTION_TABLE

SpUserModeInitialize