[WIN32SS][FONT] Fix font metrics (#713)
[reactos.git] / win32ss / gdi / eng / mapping.h
1
2 typedef struct _ENGSECTION
3 {
4 PVOID pvSectionObject;
5 PVOID pvMappedBase;
6 SIZE_T cjViewSize;
7 ULONG ulTag;
8 } ENGSECTION, *PENGSECTION;
9
10 typedef struct _FILEVIEW
11 {
12 LARGE_INTEGER LastWriteTime;
13 PVOID pvKView;
14 PVOID pvViewFD;
15 SIZE_T cjView;
16 PVOID pSection;
17 } FILEVIEW, *PFILEVIEW;
18
19 #ifdef __cplusplus
20 typedef struct _FONTFILEVIEW : FILEVIEW
21 {
22 #else
23 typedef struct _FONTFILEVIEW
24 {
25 FILEVIEW;
26 #endif
27 DWORD reserved[2];
28 PWSTR pwszPath;
29 SIZE_T ulRegionSize;
30 ULONG cKRefCount;
31 ULONG cRefCountFD;
32 PVOID pvSpoolerBase;
33 DWORD dwSpoolerPid;
34 } FONTFILEVIEW, *PFONTFILEVIEW;
35
36 enum
37 {
38 FVF_SYSTEMROOT = 1,
39 FVF_READONLY = 2,
40 FVF_FONTFILE = 4,
41 };
42
43 PVOID
44 NTAPI
45 EngMapSectionView(
46 _In_ HANDLE hSection,
47 _In_ SIZE_T cjSize,
48 _In_ ULONG cjOffset,
49 _Out_ PHANDLE phSecure);
50
51 VOID
52 NTAPI
53 EngUnmapSectionView(
54 _In_ PVOID pvBits,
55 _In_ ULONG cjOffset,
56 _In_ HANDLE hSecure);
57
58 PVOID
59 NTAPI
60 EngCreateSection(
61 _In_ ULONG fl,
62 _In_ SIZE_T cjSize,
63 _In_ ULONG ulTag);
64
65 _Success_(return!=FALSE)
66 BOOL
67 APIENTRY
68 EngMapSection(
69 _In_ PVOID pvSection,
70 _In_ BOOL bMap,
71 _In_ HANDLE hProcess,
72 _When_(bMap, _Outptr_) PVOID* pvBaseAddress);
73
74 _Check_return_
75 _Success_(return!=NULL)
76 __drv_allocatesMem(Mem)
77 _Post_writable_byte_size_(cjSize)
78 PVOID
79 APIENTRY
80 EngAllocSectionMem(
81 _Outptr_ PVOID *ppvSection,
82 _In_ ULONG fl,
83 _In_ SIZE_T cjSize,
84 _In_ ULONG ulTag);
85
86 BOOL
87 APIENTRY
88 EngFreeSectionMem(
89 _In_opt_ PVOID pvSection,
90 _In_opt_ PVOID pvMappedBase);
91
92 _Check_return_
93 PFILEVIEW
94 NTAPI
95 EngLoadModuleEx(
96 _In_z_ LPWSTR pwsz,
97 _In_ ULONG cjSizeOfModule,
98 _In_ FLONG fl);
99