Win32-2.14.1.0: A binding to Windows Win32 API.
Copyright(c) Esa Ilari Vuokko 2006
LicenseBSD-style (see the file LICENSE)
MaintainerEsa Ilari Vuokko <ei@vuokko.info>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

System.Win32.FileMapping

Description

A collection of FFI declarations for interfacing with Win32 mapped files.

Synopsis

Documentation

mapFile :: FilePath -> IO (ForeignPtr a, Int) Source #

Maps file fully and returns ForeignPtr and length of the mapped area. The mapped file is opened read-only and shared reading.

withMappedFile Source #

Arguments

:: FilePath

Path

-> Bool

Write? (False = read-only)

-> Maybe Bool

Sharing mode, no sharing, share read, share read+write

-> (Integer -> MappedObject -> IO a)

Action

-> IO a 

Opens an existing file and creates mapping object to it.

withMappedArea Source #

Arguments

:: MappedObject

Mapped object, from withMappedFile

-> Integer

Position in file

-> Int

Size of mapped area

-> (Ptr a -> IO b)

Action

-> IO b 

Maps area into memory.

Enums

Section protection flags

Access falgs

Mapping files

createFileMapping :: Maybe HANDLE -> ProtectFlags -> DDWORD -> Maybe String -> IO HANDLE Source #

openFileMapping :: FileMapAccess -> BOOL -> Maybe String -> IO HANDLE Source #

mapViewOfFileEx :: HANDLE -> FileMapAccess -> DDWORD -> SIZE_T -> Ptr a -> IO (Ptr b) Source #

unmapViewOfFile :: Ptr a -> IO () Source #