QueryContextAttributes
This function enables a transport application to query a security package for certain attributes of a security context.
SECURITY_STATUS QueryContextAttributes(
PCtxtHandle phContext,
ULONG ulAttribute,
PVOID pBuffer );
Parameters
phContext
Pointer to the handle to the context to be queried.ulAttribute
Specifies the attribute of the context to be returned. It is one of the following values:Value Description SECPKG_ATTR_SIZES Query the sizes of the structures used in the per-message functions. The pBuffer parameter is a pointer to a SecPkgContext_Sizes structure. SECPKG_ATTR_NAMES Query the name associated with the context. The pBuffer parameter is a pointer to a SecPkgContext_Names structure. SECPKG_ATTR_LIFESPAN Query the life span of the context. pBuffer is a pointer to a SecPkgContext_Lifespan structure. SECPKG_ATTR_DCE_INFO Query for authorization data used by DCE services. PBuffer is a pointer to a SecPkgContext_DceInfo structure. SECPKG_ATTR_STREAM_SIZES Query the sizes of the various stream components used in the per-message functions. The pBuffer parameter is a pointer to a SecPkgContext_StreamSizes structure. SECPKG_ATTR_AUTHORITY Query the name of the authenticating authority. The pBuffer parameter is a pointer to a SecPkgContext_Authority structure. SECPKG_ATTR_KEY_INFO Query information about the keys used in a security context. The pBuffer parameter is a pointer to a SecPkgContext_KeyInfo structure. pBuffer
Pointer to a structure that receives the attributes. The type of structure pointed to depends on the value specified in the ulAttribute parameter.
Return Values
SEC_E_OK indicates success. A nonzero error value indicates failure.
Remarks
The structure pointed to by the pBuffer parameter varies, depending on the attribute being queried. The caller must allocate the structure itself, but the package allocates other pointers that are returned in the structure. Any pointers allocated by the package can be freed by calling the FreeContextBuffer function*.*
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winbase.h | Security.h | Schannel.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
FreeContextBuffer, SecPkgContext_DceInfo, SecPkgContext_Lifespan, SecPkgContext_Names, SecPkgContext_Sizes, SecPkgContext_StreamSizes
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.