IComponentAuthenticate::SACGetProtocols
The SACGetProtocols method is used by a component to discover the authentication protocols supported by another component.
Syntax
HRESULT SACGetProtocols(DWORD**ppdwProtocols,DWORD*pdwProtocolCount);
Parameters
ppdwProtocols
[out] Pointer to an array of supported protocols. For this version of Windows Media Device Manager, it is a single-element DWORD array containing the value SAC_PROTOCOL_V1.
pdwProtocolCount
[out] Pointer to a DWORD containing the number of protocols returned in ppdwProtocols. The number is always 1 for this version.
Return Values
The method returns an HRESULT. All the interface methods in Windows Media Device Manager can return any of the following classes of error codes:
- Standard COM error codes
- Windows error codes converted to HRESULT values
- Windows Media Device Manager error codes
For an extensive list of possible error codes, see Error Codes.
Possible values include, but are not limited to, those in the following table.
Return code | Description |
S_OK | The method succeeded. |
E_INVALIDARG | The pbSPSessionKey parameter is invalid or is a NULL pointer. |
E_FAIL | An unspecified error occurred. |
Remarks
This method is implemented by a service provider, and never called by an application.
Example Code
The following method demonstrates a service provider's implementation of the SACGetProtocols method. It does this by calling CSecureChannelServer::SACGetProtocols on its private CSecureChannelServer member.
STDMETHODIMP CMyServiceProvider::SACGetProtocols(
DWORD **ppdwProtocols,
DWORD *pdwProtocolCount)
{
HRESULT hr = E_FAIL;
// Verify that the global CSecureChannelServer member is valid.
if(g_pAppSCServer == NULL)
return hr;
hr = g_pAppSCServer->SACGetProtocols(
ppdwProtocols,
pdwProtocolCount
);
return hr;
}
Requirements
Header: Defined in icomponentauthenticate.idl.
Library: mssachlp.lib
See Also