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


BOOL WINAPI FreeReservedLog(
  _Inout_ PVOID     pvMarshal,
  _In_    ULONG     cReservedRecords,
  _Inout_ PLONGLONG pcbAdjustment
);

Parameters

pvMarshal [in, out]

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

cReservedRecords [in]

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 [in, out]

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:

ERROR_ACCESS_DENIED
ERROR_INVALID_HANDLE
ERROR_INVALID_PARAMETER
ERROR_INVALID_USER_BUFFER
ERROR_IO_DEVICE
ERROR_LOG_FULL
ERROR_NO_SYSTEM_RESOURCES

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]

Header

Clfsw32.h

Library

Clfsw32.lib

DLL

Clfsw32.dll

See also

Common Log File System Functions

 

 

Community Additions

ADD
Show: