(0) exportieren Drucken
Alle erweitern
EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

CoQueryClientBlanket function

Called by the server to find out about the client that invoked the method executing on the current thread. This is a helper function for IServerSecurity::QueryBlanket.

Syntax


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

Parameters

pAuthnSvc [out, optional]

A pointer to a variable that receives the current authentication service. This will be a single value taken from the authentication service constants. If the caller specifies NULL, the current authentication service is not retrieved.

pAuthzSvc [out, optional]

A pointer to a variable that receives the current authorization service. This will be a single value taken from the authorization constants. If the caller specifies NULL, the current authorization service is not retrieved.

pServerPrincName [out, optional]

The current principal name. The string will be allocated by the callee using CoTaskMemAlloc, and must be freed by the caller using CoTaskMemFree. By default, Schannel 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 about the msstd and fullsic forms, see Principal Names. If the caller specifies NULL, the current principal name is not retrieved.

pAuthnLevel [out, optional]

A pointer to a variable that receives the current authentication level. This will be a single value taken from the authentication level constants. If the caller specifies NULL, the current authentication level is not retrieved.

pImpLevel [out, optional]

This parameter must be NULL.

pPrivs [out, optional]

A pointer to a handle that receives 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 valid only for the duration of the current call. For NTLMSSP and Kerberos, this is a string identifying the client principal. For Schannel, this is a CERT_CONTEXT structure that represents the client's certificate. If the client has no certificate, NULL is returned. If the caller specifies NULL, the current privilege information is not retrieved. See RPC_AUTHZ_HANDLE.

pCapabilities [in, out, optional]

A pointer to return flags indicating capabilities of the call. To request that the principal name be returned in fullsic form if Schannel is the authentication service, the caller can set the EOAC_MAKE_FULLSIC flag in this parameter. If the caller specifies NULL, the current capabilities are not retrieved.

Return value

This function can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, and S_OK.

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();

This sequence calls CoGetCallContext to get a pointer to IServerSecurity and, with the resulting pointer, calls IServerSecurity::QueryBlanket and then releases the pointer.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Objbase.h

Library

Ole32.lib

DLL

Ole32.dll

See also

CoGetCallContext
CoQueryProxyBlanket
IServerSecurity::QueryBlanket
Security in COM

 

 

Community-Beiträge

HINZUFÜGEN
Anzeigen:
© 2014 Microsoft