Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The SpQueryContextAttributes function retrieves the attributes of a security context.
The SpQueryContextAttributes function is the dispatch function for the QueryContextAttributes (General) function of the Security Support Provider Interface.
Syntax
SpQueryContextAttributesFn Spquerycontextattributesfn;
NTSTATUS Spquerycontextattributesfn(
[in] LSA_SEC_HANDLE ContextHandle,
[in] ULONG ContextAttribute,
[out] PVOID Buffer
)
{...}
Parameters
[in] ContextHandle
A handle to the security context.
[in] ContextAttribute
Context attribute to query. For a list of valid values, see the QueryContextAttributes (General) function.
[out] Buffer
Pointer that receives the address of a buffer containing the requested attributes. Memory for the Buffer parameter should be allocated with the AllocateHeap function from the SECPKG_DLL_FUNCTIONS function table in user-mode. In Local Security Authority (LSA) mode, use the AllocateLsaHeap function.
Return value
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 |
---|---|
|
The handle is not valid. |
Remarks
SSP/APs must implement the SpQueryContextAttributes function; however, the actual name given to the implementation is up to the developer.
A pointer to the LSA-mode implementation of the SpQueryContextAttributes function is available in the SECPKG_FUNCTION_TABLE structure received from the SpLsaModeInitialize function.
A pointer to the user-mode implementation of the SpQueryContextAttributes function is available in the SECPKG_USER_FUNCTION_TABLE structure received from the SpUserModeInitialize function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | ntsecpkg.h |