// wdm.h
CLFSUSER_API NTSTATUS ClfsCreateMarshallingArea(
[in] PLOG_FILE_OBJECT plfoLog,
[in] POOL_TYPE ePoolType,
[in, optional] PALLOCATE_FUNCTION pfnAllocBuffer,
[in, optional] PFREE_FUNCTION pfnFreeBuffer,
[in] ULONG cbMarshallingBuffer,
[in] ULONG cMaxWriteBuffers,
[in] ULONG cMaxReadBuffers,
[out] PVOID *ppvMarshalContext
);
View the official Windows Driver Kit DDI referenceNo description available.
The ClfsCreateMarshallingArea routine creates a marshalling area for a CLFS stream and returns a pointer to an opaque context that represents the new marshalling area.
plfoLog [in]A pointer to a LOG_FILE_OBJECT structure that represents a CLFS stream. The caller previously obtained this pointer by calling ClfsCreateLogFile.
ePoolType [in]A POOL_TYPE value that specifies the type of memory (paged, non-paged, for example) that the new marshalling area will use for its log I/O blocks.
pfnAllocBuffer [in, optional]Either NULL or a pointer to a caller-supplied function that allocates a log I/O block for the marshalling area. The allocation function has the following prototype:
The return value of the allocation function is a pointer to the newly allocated log I/O block.
pfnFreeBuffer [in, optional]Either NULL or a pointer to a caller-supplied function that frees a log I/O block that was previously allocated by pfnAllocBuffer. The function has the following prototype:
VOID
(*PFREE_FUNCTION) (
IN PVOID Buffer
);
cbMarshallingBuffer [in]The size, in bytes, of the individual log I/O blocks that the new marshalling area uses. This must be a multiple of the sector size on the stable storage medium. The sector size is the lpBytesPerSector value returned from GetDiskFreeSpace.
cMaxWriteBuffers [in]The maximum number of I/O blocks that can be allocated at one time for write operations. This parameter affects the frequency of data flushes. If you do not need to control the frequency of data flushes, set this parameter to INFINITE.
cMaxReadBuffers [in]The maximum number of log I/O blocks that can be allocated at one time for read operations.
ppvMarshalContext [out]A pointer to a variable that receives a pointer to an opaque context that represents the new marshalling area.
ClfsCreateMarshallingArea returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h.
The pfnAllocBuffer and pfnFreeBuffer parameters must both point to caller-allocated functions, or they must both be NULL. If they are both NULL, CLFS provides default functions for allocating and freeing log I/O blocks.
Before calling ClfsCreateMarshallingArea, you must add at least two containers to the underlying log by calling ClfsAddLogContainer or ClfsAddLogContainerSet.
For an explanation of CLFS concepts and terminology, see Common Log File System.