QuerySecurityContextToken function
Obtains the access token for a client security context and uses it directly.
Syntax
SECURITY_STATUS SEC_Entry QuerySecurityContextToken( _In_ PCtxtHandle phContext, _Out_ HANDLE *phToken );
Parameters
- phContext [in]
-
Handle of the context to query.
- phToken [out]
-
Returned handle to the access token.
Return value
If the function succeeds, the function returns SEC_E_OK.
If the function fails, it returns a nonzero error code. One possible error code return is SEC_E_INVALID_HANDLE.
Remarks
This function is called by a server application to control impersonation outside the SSPI layer, such as when launching a child process. The handle returned must be closed with CloseHandle when the handle is no longer needed.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also