source: trunk/src/kernel32/hmfilemapping.h@ 659

Last change on this file since 659 was 659, checked in by phaller, 26 years ago

Add: HandleManager support for memory mapped files

File size: 3.9 KB
Line 
1/* $Id: hmfilemapping.h,v 1.1 1999-08-24 14:36:05 phaller Exp $ */
2
3/*
4 * Project Odin Software License can be found in LICENSE.TXT
5 * Win32 Unified Handle Manager for OS/2
6 * 1999/06/17 PH Patrick Haller (phaller@gmx.net)
7 */
8
9#ifndef _HM_DEVICE_FILEMAPPING_H_
10#define _HM_DEVICE_FILEMAPPING_H_
11
12
13/*****************************************************************************
14 * Remark *
15 *****************************************************************************
16 */
17
18
19/*****************************************************************************
20 * Includes *
21 *****************************************************************************/
22
23#include "HMDevice.h"
24#include "HMObjects.h"
25
26
27/*****************************************************************************
28 * Structures *
29 *****************************************************************************/
30
31class HMDeviceFileMappingClass : public HMDeviceKernelObjectClass
32{
33public:
34 HMDeviceFileMappingClass(LPCSTR lpDeviceName) : HMDeviceKernelObjectClass(lpDeviceName) {}
35
36 /* identify mapping object by the base address */
37 static int findByBaseAddress (LPVOID lpBaseAddress);
38
39 /* this is a handler method for calls to CreateFileMapping() */
40 virtual DWORD CreateFileMapping (PHMHANDLEDATA pHMHandleData,
41 HANDLE hFile,
42 LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
43 DWORD flProtect,
44 DWORD dwMaximumSizeHigh,
45 DWORD dwMaximumSizeLow,
46 LPCTSTR lpName);
47
48 /* this is a handler method for calls to OpenFileMapping() */
49 virtual DWORD OpenFileMapping (PHMHANDLEDATA pHMHandleData,
50 BOOL fInherit,
51 LPCTSTR lpName);
52
53 /* this is a handler method for calls to MapViewOfFile() */
54 virtual LPVOID MapViewOfFile (PHMHANDLEDATA pHMHandleData,
55 DWORD dwDesiredAccess,
56 DWORD dwFileOffsetHigh,
57 DWORD dwFileOffsetLow,
58 DWORD dwNumberOfBytesToMap);
59
60 /* this is a handler method for calls to MapViewOfFileEx() */
61 virtual LPVOID MapViewOfFileEx (PHMHANDLEDATA pHMHandleData,
62 DWORD dwDesiredAccess,
63 DWORD dwFileOffsetHigh,
64 DWORD dwFileOffsetLow,
65 DWORD dwNumberOfBytesToMap,
66 LPVOID lpBaseAddress);
67
68 /* this is a handler method for calls to UnmapViewOfFile() */
69 virtual BOOL UnmapViewOfFile (PHMHANDLEDATA pHMHandleData,
70 LPVOID lpBaseAddress);
71
72 /* this is a handler method for calls to FlushViewOfFile() */
73 virtual BOOL FlushViewOfFile (PHMHANDLEDATA pHMHandleData,
74 LPVOID lpBaseAddress,
75 DWORD dwNumberOfBytesToFlush);
76
77};
78
79
80#endif /* _HM_DEVICE_FILEMAPPING_H_ */
81
Note: See TracBrowser for help on using the repository browser.