CSecureChannelServer::SACAuth

banner art

The SACAuth method establishes a secure authenticated channel between components.

Syntax

HRESULT SACAuth (
  DWORD  dwProtocolID,
  DWORD  dwPass,
  BYTE*  pbDataIn,
  DWORD  dwDataInLen,
  BYTE**  ppbDataOut,
  DWORD*  pdwDataOutLen
);

Parameters

  dwProtocolID

DWORD specifying the protocol identifier. This parameter must be set to SAC_PROTOCOL_V1.

  dwPass

DWORD containing the number of the current pass.

  pbDataIn

[in] Pointer to the first byte of the input authentication data.

  dwDataInLen

DWORD specifying the length of the data to which pbDataIn points.

  ppbDataOut

[out] Pointer to a pointer to the output authentication data.

  pdwDataOutLen

Pointer to a DWORD specifying the length of the data to which ppbDataOut points.

Return Values

The method returns an HRESULT. All the interface methods in Windows Media Device Manager and service provider 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 a complete 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 A parameter is invalid or is a NULL pointer.
E_FAIL An unspecified error occurred.

Remarks

This method is called one or more times as dictated by the protocol identifier. The structure of the data in pbDataIn and pbDataOut is determined by the values of dwProtocolID and dwPass. The dwPass parameter indicates the number of the communication pass that is under way.

For more information on how to implement this method, see the example code in To Implement IComponentAuthenticate in a Service Provider.

Delegate the methods of IComponentAuthenticate to the global CSecureChannelServer object.

Before calling the SACAuth method, call SetCertificate.

After calling SACAuth, call SACGetProtocols.

Example Code

g_pAppSCServer = new CSecureChannelServer();
if (g_pAppSCServer )
    hr = pAppSCServer ->SACAuth(dwProtocolId, dwPass, pbDataIn,
                         dwDataInLen, ppbDataOut, pdwDataOutLen);
else
    hr = E_FAIL;

Requirements

Header: Include scserver.h.

Library: mssachlp.lib

See Also