Edit

Share via


AlignReservedLog function (clfsw32.h)

Calculates the sector-aligned reservation size for a set of reserved records. This value is then passed to AllocReservedLog to reserve a block of log space for a set of records.

Syntax

CLFSUSER_API BOOL AlignReservedLog(
  [in, out] PVOID       pvMarshal,
  [in]      ULONG       cReservedRecords,
  [in]      LONGLONG [] rgcbReservation,
  [out]     PLONGLONG   pcbAlignReservation
);

Parameters

[in, out] pvMarshal

A pointer to the opaque marshaling context that is allocated by calling the CreateLogMarshallingArea function.

[in] cReservedRecords

The number of reserved records that are associated with the reservation adjustment.

[in] rgcbReservation

An array of space allocations to reserve in the log that is associated with the current marshaling context, in bytes.

The number of allocations corresponds to the number of records that cReservedRecords specifies. Each allocation must be greater than zero (0) or the function fails with ERROR_INVALID_PARAMETER.

[out] pcbAlignReservation

A pointer to a variable in which the function returns the number of sector-aligned byte space to be reserved in the log—after being given the number of records that cRecords specifies and the size of reservations specified in the rgcbReservation array.

The value returned in *pcbAlignReservation is used as input to AllocReservedLog. If AllocReservedLog succeeds, this value is always greater than zero (0). If AllocReservedLog fails, the value is zero (0).

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero (0). To get extended error information, call GetLastError. The following list identifies the possible error codes:

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 R2 [desktop apps only]
Target Platform Windows
Header clfsw32.h
Library Clfsw32.lib
DLL Clfsw32.dll

See also

AllocReservedLog

Common Log File System Functions