Compartilhar via


CSecureChannelClient::MACUpdate

banner art

The MACUpdate method updates the message authentication code (MAC) value with a parameter value.

Syntax

HRESULT MACUpdate(
  HMAC  hMAC,
  BYTE*  pbData,
  DWORD  dwDataLen
);

Parameters

  hMAC

[in] Handle to the array containing the MAC for the current parameter data. This handle is returned from the MACInit method.

  pbData

[in] Pointer to the parameter data to add to the MAC value.

  dwDataLen

DWORD specifying the length of the data to which pbData 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

MACUpdate is called repeatedly with each piece of data to add to the MAC. MACInit must always be called prior to MACUpdate, and MACFinal must always be called after MACUpdate. MACInit acquires the MAC handle, phMAC, to be used by the MACUpdate and MACFinal methods.

Example Code

See example code for the following methods:

Requirements

Header: Include scclient.h.

Library: mssachlp.lib

See Also