JCL Help:TJclCustomFileMapping

From Project JEDI Wiki
Jump to navigationJump to search

Class Hierarchy

TJclCustomFileMapping
|
TJclFileMapping
|
TJclSwapFileMapping


Summary

Wrapper for Win32 filemapping object.


Pascal

 public TJclCustomFileMapping = class(TObject);


Description

TJclCustomFileMapping is a wrapper for a Win32 filemapping object. In a nutshell, a filemapping is an abstraction of a disk file which allows you to manipulate the file as if it were just another block of memory, as such you manipulate it using pointers. The filemapping object itself is only used to maintain the association with the file, while a filemapping view object is used to manipulate (part of) the file. You can create multiple views of a (part of a) file which are guaranteed to remain coherent. Additionally you can create a filemapping object which is associated with the swap file as opposed to an actual disk file. Since multiple processes can open a handle to the same filemapping, this is an ideal way to share data between multiple processes. Unless you are opening a filemapping object as opposed to creating one, you should not use this class directly. Instead use the derived TJclFileMapping and TJclSwapFileMapping classes. These two classes only differ in their constructors but do prevent you from a common mistake (related to the return value of CreateFile).


About

Unit

JclFileUtils


Navigation

Donator

Wim De Cleen


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page