ICrmCompensator::PrepareRecord method (comsvcs.h)

Delivers a log record in forward order during the prepare phase. This method can be received by the CRM Compensator multiple times, once for each log record that is written.

Syntax

HRESULT PrepareRecord(
  [in]  CrmLogRecordRead crmLogRec,
  [out] BOOL             *pfForget
);

Parameters

[in] crmLogRec

The log record, as a CrmLogRecordRead structure.

[out] pfForget

Indicates whether the delivered record should be forgotten.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Unstructured log records are delivered as a CrmLogRecordRead structure. In addition to the user data (as a single BLOB), this structure contains a couple of additional fields that might be useful for debugging or fault-finding if human compensation is necessary. The dwCrmFlags member is a bitfield that provides further information about whether this record was forgotten at some point and when it was written. The dwSequenceNumber member provides the sequence number of the log record. In most cases, sequence numbers are sequential but are not necessarily contiguous due to internal log records that are not delivered to the CRM Compensator.

If no log records are written by the CRM Worker, the BeginPrepare and EndPrepare methods are received but there are no PrepareRecord method calls. This is to allow for CRM Compensators that write log records at prepare time only.

The CRM Compensator can choose to forget the record that is delivered to it during this phase by setting the forget flag on return from this method.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header comsvcs.h

See also

ICrmCompensator