ReactOS 0.4.15-dev-7934-g1dc8d80
eng-mem-1.c
Go to the documentation of this file.
1#include <ntddk.h>
2#include <winddi.h>
3
4#include "regtests.h"
5
6static void RunTest()
7{
8#if 0
9 VOID *pmem1, *pmem2;
10 ULONG AllocSize1, AllocSize2;
11 ULONG AllocTag1, AllocTag2;
12 HANDLE Handle1, Handle2;
13
14 /* Allocate memory with EngAllocMem */
15 pmem1 = 0;
16 AllocSize1 = 1024;
17 AllocTag1 = 'zyxD';
18 pmem1 = EngAllocMem(FL_ZERO_MEMORY, AllocSize1, AllocTag1);
19 _AssertNotEqualValue(pmem1, NULL);
20
21 /* Allocate memory with EngAllocMem */
22 pmem2 = 0;
23 AllocSize2 = 1024;
24 AllocTag2 = 'zyxD';
25 pmem2 = EngAllocUserMem(AllocSize2, AllocTag2);
26 _AssertNotEqualValue(pmem1, NULL);
27
28 /* Lock down memory with EngSecureMem
29 ** Dependant functions in ntoskrnl.exe are currently unimplemented
30 Handle1 = EngSecureMem(pmem1, AllocSize1);
31 _AssertNotEqualValue(pmem1, NULL);
32 Handle2 = EngSecureMem(pmem2, AllocSize2);
33 _AssertNotEqualValue(pmem2, NULL);
34
35 /* Unlock down memory with EngSecureMem
36 ** Dependant functions in ntoskrnl.exe are currently unimplemented
37 EngUnsecureMem(Handle1);
38 EngUnsecureMem(Handle2); */
39
40 /* Free memory with EngFreeMem */
41 EngFreeMem(pmem1);
42
43 /* Free memory with EngFreeUserMem */
44 EngFreeUserMem(pmem2);
45#endif
46}
47
48_Dispatcher(Eng_mem_1Test, "Win32k Engine Memory API")
#define NULL
Definition: types.h:112
static void RunTest()
Definition: eng-mem-1.c:6
#define EngFreeMem
Definition: polytest.cpp:56
#define FL_ZERO_MEMORY
Definition: polytest.cpp:58
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Definition: polytest.cpp:70
uint32_t ULONG
Definition: typedefs.h:59
ENGAPI VOID APIENTRY EngFreeUserMem(_Pre_notnull_ __drv_freesMem(UserMem) PVOID pv)