Partager via


IServerSecurity::QueryBlanket (Compact 2013)

3/26/2014

This method is called by the server to find out about the client that invoked one of its methods.

Syntax

HRESULT QueryBlanket(
  DWORD* pAuthnSvc,
  DWORD* pAuthzSvc,
  OLECHAR** pServerPrincName,
  DWORD* pAuthnLevel,
  DWORD* pImpLevel,
  RPC_AUTHZ_HANDLE* pPrivs,
  DWORD* pCapabilities 
);

Parameters

  • pAuthnSvc
    [out] Pointer to the current authentication service. This will be 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 the current authorization service. This will be 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 will be allocated by the callee using CoTaskMemAlloc, and must be freed by the caller using CoTaskMemFree when they are done with it. If the caller specifies NULL, the current principal name is not retrieved.
  • pAuthnLevel
    [out] Pointer to the current authentication level. This will be 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] Reserved; set to NULL.
  • pPrivs
    [out] Pointer to a handle to the privilege information for the client application. The format of the structure is authentication service specific. The application should not write or free the memory. The information is only valid for the duration of the current call.

    If the caller specifies NULL, the current privilege information is not retrieved.

    For NTLMSSP and Kerberos, this is the client's principal name.

  • pCapabilities
    [in, out] Pointer to return flags indicating capabilities of the call. If the caller specifies NULL, the current capabilities are not retrieved.

Return Value

This method supports the standard return values E_INVALIDARG and E_OUTOFMEMORY, as well as the following:

  • S_OK
    Success.

Remarks

IServerSecurity::QueryBlanket is used by the server to find out about the client that invoked one of its methods. To get a pointer to IServerSecurity for the current call on the current thread, call CoGetCallContext, specifying IID_IServerSecurity. This interface pointer can only be used in the same apartment as the call for the duration of the call.

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

Requirements

Header

objidl.h,
objidl.idl

Library

ole32.lib,
uuid.lib

See Also

Reference

IServerSecurity
CoGetCallContext
CoQueryClientBlanket