14{
19
20
23 (void**)&allocationStart,
24 0,
25 &allocationSize,
29
30
32 (void**)&allocationStart,
33 0,
34 &allocationSize,
38
39
41 {
42 *allocationStart = 0xFF;
44
45
47 {
48 ok(*allocationStart == 0xFF,
"Memory was not written\n");
50
51
53 (void**)&allocationStart,
54 &allocationSize,
56 &oldProtection);
58 ok(oldProtection ==
PAGE_READWRITE,
"Expected PAGE_READWRITE, got %08lx.\n", oldProtection);
59
60
62 {
63 *allocationStart = 0xAA;
65
66
68 {
69 ok(*allocationStart == 0xFF,
"read-only memory were changed.\n");
71
72
74 (void**)&allocationStart,
75 &allocationSize,
77 &oldProtection);
79 ok(oldProtection ==
PAGE_READONLY,
"Expected PAGE_READONLY, got %08lx.\n", oldProtection);
80
81
83 {
84 *allocationStart = 0xAA;
86
87
89 {
90 ok(*allocationStart == 0,
"Test should not go as far as this.\n");
92
93
95 (void**)&allocationStart,
96 &allocationSize,
98 &oldProtection);
100 ok(oldProtection ==
PAGE_NOACCESS,
"Expected PAGE_READONLY, got %08lx.\n", oldProtection);
101
102
104 {
105 *allocationStart = 0xAA;
107
108
110 {
111 ok(*allocationStart == 0xFF,
"Memory content was not preserved.\n");
113
114
116 (void**)&allocationStart,
117 &allocationSize,
120}
#define EndSeh(ExpectedStatus)
#define STATUS_ACCESS_VIOLATION