FreeReservedLog function

Reduces the number of reserved log records in a marshaling area made by calling ReserveAndAppendLog, ReserveAndAppendLogAligned, or AllocReservedLog. By using this function, clients can free an aggregate set of records and bytes that are reserved in the marshaling area.

Syntax

CLFSUSER_API BOOL FreeReservedLog(
  IN OUT PVOID     pvMarshal,
  IN ULONG         cReservedRecords,
  IN OUT PLONGLONG pcbAdjustment
);

Parameters

pvMarshal

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

cReservedRecords

The number of reserved records to be freed.

If the byte count of the adjustment in pcbAdjustment is positive, cReservedRecords is the total number of reserved records that are remaining after the adjustment. Otherwise, this parameter specifies the number of records to be subtracted from the current number of reserved records, but can never exceed the reserved count.

pcbAdjustment

The number of bytes of reservation space affected by the adjustment.

On input, if this number is positive, it specifies the total remaining size of the reserved space after the adjustment. If this parameter is negative, its absolute value is the number of bytes to be freed.

This value is usually an aggregate of the actual reserved space that is returned in a previous call to the following:

Return Value

If the function succeeds, the return value is nonzero.

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

Remarks

When you reserve records, you reserve a specific size. When you free those records, you must free the same size.

Requirements

   
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

Common Log File System Functions