Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function is called by the server to find out about the client that invoked the method executing on the current thread.
Syntax
HRESULT CoQueryClientBlanket( DWORD* pAuthnSvc, DWORD* pAuthzSvc, OLECHAR** pServerPrincName, DWORD* pAuthnLevel, DWORD* pImpLevel, RPC_AUTHZ_HANDLE* pPrivs, DWORD** pCapabilities ); |
Parameters
- pAuthnSvc
-
[out] Pointer to a DWORDvalue defining the current authentication service. This will be a single value taken from the list of RPC_C_AUTHN_ XXX constants. May be NULL, in which case the current authentication service is not returned.
- pAuthzSvc
-
[out] Pointer to a DWORDvalue defining the current authorization service. This will be a single value taken from the list of RPC_C_AUTHZ_ XXX constants. May be NULL, in which case the current authorization service is not returned.
- pServerPrincName
-
[out] Pointer to the current principal name. The string will be allocated by the callee using CoTaskMemAllocand must be freed by the caller using CoTaskMemFreewhen they are done with it. Can be NULL, in which case the principal name is not returned.
By default, SSL principal names will be in the msstd form. The fullsic form will be returned if EOAC_MAKE_FULLSIC is specified in the pCapabilities parameter. For more information on msstd and fullsic, see the SSL section of COM and Security Packages.
- pAuthnLevel
-
[out] Pointer to a DWORDvalue defining the current authentication level. This will be a single value taken from the list of RPC_C_AUTHN_LEVEL_ XXX constants. May be NULL, in which case the current authentication level is not returned.
- pImpLevel
-
[out] Must be NULL. This parameter is reserved for future use.
- pPrivs
-
[out] Pointer to a handle that indicates the privilege information for the client application. The format of the structure that the handle refers to depends on the authentication service.
The application should not write or free the memory.
The information is only valid for the duration of the current call.
NULL can be returned, in which case the privilege information is not returned.
For NTLMSSP and Kerberos, this is the client's principal name.
- pCapabilities
-
[in, out] Pointer to return flags indicating capabilities of the call. May be NULL, in which case the flags indicating capabilities are not returned.
Return Value
- S_OK
-
Success.
- E_INVALIDARG
-
One or more arguments are invalid.
- E_OUTOFMEMORY
-
Insufficient memory to create the pServerPrincNameout-parameter.
Remarks
CoQueryClientBlanketis called by the server to get security information about the client that invoked the method executing on the current thread. This function encapsulates the following sequence of common calls (error handling excluded).
Copy Code | |
---|---|
CoGetCallContext(IID_IServerSecurity, (void**)&pss); pss->QueryBlanket(pAuthnSvc, pAuthzSvc, pServerPrincName, pAuthnLevel, pImpLevel, pPrivs, pCapabilities); pss->Release(); |
To determine whether the platform supports this function, see Determining Supported COM APIs.
Requirements
Header | objbase.h |
Library | ole32.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |