Partager via


CSecureChannelClient::MACFinal

banner art

The MACFinal method releases the message authentication code (MAC) channel and retrieves a final MAC value.

Syntax

HRESULT MACFinal(
  HMAC  hMAC,
  BYTE  abData[WMDM_MAC_LEN]
);

Parameters

  hMAC

[in] Handle for the MAC for the current parameter data. The handle, hMAC is returned from the MACInit method.

  abData

[out] Array of bytes to receive the final MAC value for the current parameter data.

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.
E_FAIL An unspecified error occurred.

Remarks

CSecureChannelClient::MACFinal completes a message authentication code (MAC) process. It is the last call in the MAC process for parameters. The MACInit and MACUpdate methods must be called prior to MACFinal. MACInit acquires the MAC handle.  hMAC is no longer valid after the MACFinal call.

Example Code

See example code for the following methods:

Requirements

Header: Include scclient.h.

Library: mssachlp.lib

See Also