Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

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

Sspi.h (include Security.h)

Library

Secur32.lib

DLL

Secur32.dll

See also

SSPI Functions
CloseHandle

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.