Export (0) Print
Expand All
COM
Expand Minimize

CoQueryAuthenticationServices function

Retrieves a list of the authentication services registered when the process called CoInitializeSecurity.

Syntax


HRESULT CoQueryAuthenticationServices(
  _Out_  DWORD *pcAuthSvc,
  _Out_  SOLE_AUTHENTICATION_SERVICE **asAuthSvc
);

Parameters

pcAuthSvc [out]

A pointer to a variable that receives the number of entries returned in the asAuthSvc array.

asAuthSvc [out]

A pointer to an array of SOLE_AUTHENTICATION_SERVICE structures. The list is allocated through a call to the CoTaskMemAlloc function. The caller must free the list when finished with it by calling the CoTaskMemFree function.

Return value

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

Remarks

CoQueryAuthenticationServices retrieves a list of the authentication services currently registered. If the process calls CoInitializeSecurity, these are the services registered through that call. If the application does not call it, CoInitializeSecurity is called automatically by COM, registering the default security package, the first time an interface is marshaled or unmarshaled.

This function returns only the authentication services registered with CoInitializeSecurity. It does not return all of the authentication services installed on the computer, but EnumerateSecurityPackages does. CoQueryAuthenticationServices is primarily useful for custom marshalers, to determine which principal names an application can use.

Different authentication services support different levels of security. For example, NTLMSSP does not support delegation or mutual authentication while Kerberos does. The application is responsible only for registering authentication services that provide the features the application needs. This function provides a way to find out which services have been registered with CoInitializeSecurity.

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

CoInitializeSecurity
Security in COM
SOLE_AUTHENTICATION_SERVICE

 

 

Community Additions

ADD
Show:
© 2014 Microsoft