3 * lib/kernel32/mem/isbad.c
5 * ReactOS Operating System
11 #include "../include/debug.h"
13 /* FIXME: Stubs. What is it for? */
24 while( lpsz
[i
] && i
< ucchMax
) i
++;
29 /* FIXME: Stubs. What is it for? */
40 while( lpsz
[i
] && i
< uiMax
) i
++;
56 MEMORY_BASIC_INFORMATION MemoryInformation
;
66 sizeof (MEMORY_BASIC_INFORMATION
)
69 if ( MemoryInformation
.State
!= MEM_COMMIT
)
74 if ( MemoryInformation
.RegionSize
< ucb
)
79 if ( MemoryInformation
.Protect
== PAGE_EXECUTE
)
84 if ( MemoryInformation
.Protect
== PAGE_NOACCESS
)
104 return IsBadReadPtr (lp
, ucb
);
117 MEMORY_BASIC_INFORMATION MemoryInformation
;
123 sizeof (MEMORY_BASIC_INFORMATION
)
126 if ( MemoryInformation
.State
!= MEM_COMMIT
)
131 if ( (MemoryInformation
.Protect
== PAGE_EXECUTE
)
132 || (MemoryInformation
.Protect
== PAGE_EXECUTE_READ
)
152 MEMORY_BASIC_INFORMATION MemoryInformation
;
162 sizeof (MEMORY_BASIC_INFORMATION
)
165 if ( MemoryInformation
.State
!= MEM_COMMIT
)
170 if ( MemoryInformation
.RegionSize
< ucb
)
176 if ( MemoryInformation
.Protect
== PAGE_READONLY
)
181 if ( (MemoryInformation
.Protect
== PAGE_EXECUTE
)
182 || (MemoryInformation
.Protect
== PAGE_EXECUTE_READ
)
188 if ( MemoryInformation
.Protect
== PAGE_NOACCESS
)
207 return IsBadWritePtr (lp
, ucb
);
225 return IsBadReadPtr (
246 return IsBadReadPtr (