Compartir a través de


CSecureChannelServer::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 to the MAC for the current parameter data. The handle is returned from the MACInit method.

  abData

[out] Pointer to an 8-byte buffer 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

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

Example Code

See the Example Code for CSecureChannelServer::MACInit.

Requirements

Header: Include scserver.h.

Library: mssachlp.lib

See Also