CoQueryAuthenticationServices  2SLGRC.

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

HRESULT CoQueryAuthenticationServices(

    DWORD * pcAuthSvc,

//Pointer to the number of entries returned in the array

    SOLE_AUTHENTICATION_SERVICE**  prgAuthSvc

//Pointer to an array of structures

   );

 

 

Parameters

pcAuthSvc

[out] Pointer to return the number of entries returned in the rgAuthSvc array. May not be NULL.

prgAuthSvc

[out] Pointer to an array of SOLE_AUTHENTICATION_SERVICEA7X3W5 structures. The list is allocated through a call to CoTaskMemAlloc16SUUVR. The caller must free the list when finished with it by calling CoTaskMemFree10DHDVF.

Return Values

This function supports the standard return values E_INVALIDARG and

E_OUTOFMEMORY, as well as the following:

S_OK

Indicates success.

 

Remarks

CoQueryAuthenticationServices retrieves a list of the authentication services currently registered. If the process calls CoInitializeSecurity12NDMS, these are the services registered through that call; if not, those registered by default by OLE.

This function 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 is the way to query which services have been registered with CoInitializeSecurity.

See Also

CoInitializeSecurity, SOLE_AUTHENTICATION_SERVICE, Security in COM