JCL Help:TJclFileMapping.Create@THandle@string@Cardinal@Int64@PSecurityAttributes

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Creates an instance of a TJclFileMapping object.


Pascal

 public constructor Create(const FileName: string; FileMode: Cardinal; const Name: string; Protect: Cardinal; const MaximumSize: Int64; SecAttr: PSecurityAttributes); overload;
public constructor Create(const FileHandle: THandle; const Name: string; Protect: Cardinal; const MaximumSize: Int64; SecAttr: PSecurityAttributes); overload;


Parameters

Parameters Description
const FileName: string Fully qualified name of the file to map.
FileMode: Cardinal Access mode to open the file with. See the "File open mode constants" topic in the Delphi help for a list of valid values.
const Name: string Name for the filemapping object. Specifying a name allows another process to open the same filemapping object.
Protect: Cardinal Protection attributes for the filemapping object. See the Win32 help file or Platform SDK for the allowed values (look at the description of the CreateFileMapping function, flProtect parameter).
const MaximumSize: Int64 Maximum size of the filemapping object. If you specify 0 the filemapping will be the same size as the underlying disk file (which is not allowed to have a size of 0 itself).
SecAttr: PSecurityAttributes Security attributes for the filemapping. See the Win32 help file or Platform SDK for details.
const FileHandle: THandle Handle to a disk file. Must be a valid handle.


Description

Creates an instance of a TJclFileMapping object. The filemapping object is backed by an actual disk file and it is the callers responsibility to ensure the disk file actually exists. As such the FileHandle parameter must be a valid handle or the FileName, FileMode combination must be valid.


About

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