Silverfrost Logo About Us | Contact Us
 

MAP_FILE_FOR_READING@

Platform

Win32(ClearWin+)

Purpose

To map a file to memory (Win32 only).

Syntax

INTEGER(7) FUNCTION MAP_FILE_FOR_READING@( FILENAME, SIZE )
CHARACTER*(*) FILENAME
INTEGER SIZE

Description

When a file is memory mapped, a region of memory is defined so that accesses to that memory effectively access the disk file. A file may be opened for reading using MAP_FILE_FOR_READING@.

FILENAME is the name of the file to be opened and SIZE is returned as the size of the file.

Use the various Silverfrost CORE intrinsic functions to access the contents of the file. Any attempt to alter the contents of the file will cause an error.

Return value

Returns the starting address of the mapped view or zero on failure

Notes

To call a routine with a mapped file as an argument use the form MYSUB(CCORE1(PTR)) where PTR is the value returned by MAP_FILE_FOR_READING@.

See also

MAP_FILE_FOR_READ_WRITE@, UNMAP_FILE@

 

 

Copyright © 1999-2017 Silverfrost Limited