IClientSecurity::QueryBlanket (Windows CE 5.0)

Send Feedback

This method retrieves authentication information the client uses to make calls on the specified proxy.

HRESULT QueryBlanket(IUnknown* pProxy,DWORD* pAuthnSvc,DWORD* pAuthzSvc,OLECHAR** pServerPrincName,DWORD* pAuthnLevel,DWORD* pImpLevel,RPC_AUTH_IDENTITY_HANDLE* pAuthInfo, DWORD* pCapabilities);

Parameters

  • pProxy
    [in] Pointer indicating the proxy to query.

    It cannot be NULL.

    For more information, see the Remarks section.

  • pAuthnSvc
    [out] Pointer to a DWORD value defining the current authentication service.

    This is a single value taken from the list of RPC_C_AUTHN_XXX constants.

    If the caller specifies NULL, the current authentication service is not retrieved.

  • pAuthzSvc
    [out] Pointer to a DWORD value defining the current authorization service.

    This is a single value taken from the list of RPC_C_AUTHZ_XXX constants.

    If the caller specifies NULL, the current authorization service is not retrieved.

  • pServerPrincName
    [out] Pointer to the current principal name.

    The string is allocated by the callee using CoTaskMemAlloc and must be freed by the caller using CoTaskMemFree when they are done with it.

    The actual principal name is returned.

    If the caller specifies NULL, the current principal name is not retrieved.

  • pAuthnLevel
    [out] Pointer to a DWORD value defining the current authentication level.

    This is a single value taken from the list of RPC_C_AUTHN_LEVEL_XXX constants.

    If the caller specifies NULL, the current authentication level is not retrieved.

  • pImpLevel
    [out] Pointer to a DWORD value defining the current impersonation level.

    This is a single value taken from the list of RPC_C_IMP_LEVEL_XXX constants.

    If the caller specifies NULL, the current impersonation level is not retrieved.

    When using NTLMSSP, this value could be RPC_IMP_LEVEL_IDENTIFY or RPC_IMP_LEVEL_IMPERSONATE.

    When using Kerberos, it can be RPC_IMP_LEVEL_IDENTIFY, RPC_IMP_LEVEL_IMPERSONATE, or RPC_C_IMP_LEVEL_DELEGATE.

  • pAuthInfo
    [out] Pointer to a handle indicating the identity of the client that was passed to the last IClientSecurity::SetBlanket call (or the default value).

    Default values are only valid until the proxy is released.

    If the caller specifies NULL, the client identity is not retrieved.

    The format of the structure that the returned handle refers to depends on the authentication service.

    For NTLMSSP and Kerberos, if the client specified a structure in the pAuthInfo parameter to CoInitializeSecurity, that value is returned. Because this points to the value itself and is not a copy, it should not be manipulated or freed.

  • pCapabilities
    [out] Pointer to a DWORD of flags indicating the capabilities of the proxy.

    Can be NULL, in which case the flags are not retrieved.

    For Windows 2000, these can be EOAC_STATIC_CLOAKING or EOAC_DYNAMIC_CLOAKING.

    If the caller specifies NULL, the current capability flags are not retrieved.

Return Values

  • S_OK
    Success.
  • E_INVALIDARG
    One or more arguments are invalid.
  • E_OUTOFMEMORY
    Insufficient memory to create the pServerPrincName out-parameter.

Remarks

IClientSecurity::QueryBlanket is called by the client to retrieve the authentication information COM will use on calls made from the specified interface proxy.

With a pointer to an interface on the proxy, the client would first call QueryInterface for a pointer to IClientSecurity; then, with this pointer, the client would call IClientSecurity::QueryBlanket, followed by releasing the pointer. This sequence of calls is encapsulated in the helper function CoQueryProxyBlanket.

In pProxy, you pass an interface pointer. However, you cannot pass a pointer to an interface that does not use a proxy. Thus you cannot pass a pointer to an interface that has the local keyword in its interface definition because no proxy is created for such an interface. IUnknown is the exception to this rule.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Objidl.h, Objidl.idl.
Link Library: Ole32.lib, Uuid.lib.

See Also

CoQueryProxyBlanket

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.