#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include <pseh/pseh.h>
Go to the source code of this file.
◆ execute()
Definition at line 13 of file noexecute.c.
14{
17
19
21 {
23 }
25 {
27 }
30 {
32 }
33 else
34 {
36 }
37}
#define _SEH_GetExceptionCode()
Referenced by add_file_data(), and main().
◆ main()
Definition at line 41 of file noexecute.c.
42{
43 unsigned char stack[100];
46
48
51 execute(
"Executing within the data segment", (
int(*)(
int))
data);
53 execute(
"Executing on stack segment", (
int(*)(
int))
stack);
56 execute(
"Executing on the heap with protection PAGE_READWRITE", (
int(*)(
int))
heap);
58 execute(
"Executing on the heap with protection PAGE_EXECUTE", (
int(*)(
int))
heap);
59
60 return 0;
61}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define memcpy(s1, s2, n)
void execute(char *message, int(*func)(int))
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
BOOL NTAPI VirtualProtect(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flNewProtect, OUT PDWORD lpflOldProtect)
◆ test()
Definition at line 8 of file noexecute.c.
9{
11}
GLint GLint GLint GLint GLint x
◆ data