CoQueryClientBlanket (Compact 2013)
3/26/2014
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 DWORD value 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 DWORD value 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 CoTaskMemAlloc and must be freed by the caller using CoTaskMemFree when 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 DWORD value 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] Reserved; set to NULL.
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 pServerPrincName out-parameter.
Remarks
CoQueryClientBlanket is 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).
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 |