ReactOS  0.4.15-dev-4603-gb922b6d
UnProtect Struct Reference
Collaboration diagram for UnProtect:

Public Member Functions

 UnProtect (PVOID addr)
 
 ~UnProtect ()
 

Public Attributes

PVOID mAddr
 
DWORD mProt
 

Detailed Description

Definition at line 63 of file delayimp.cpp.

Constructor & Destructor Documentation

◆ UnProtect()

UnProtect::UnProtect ( PVOID  addr)
inline

Definition at line 65 of file delayimp.cpp.

66  :mAddr(NULL), mProt(0)
67  {
68  if (IsBadWritePtr(addr, 1))
69  {
70  mAddr = addr;
72  }
73  }
BOOL NTAPI IsBadWritePtr(IN LPVOID lp, IN UINT_PTR ucb)
Definition: except.c:881
PVOID mAddr
Definition: delayimp.cpp:81
DWORD mProt
Definition: delayimp.cpp:82
BOOL NTAPI VirtualProtect(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flNewProtect, OUT PDWORD lpflOldProtect)
Definition: virtmem.c:144
GLenum const GLvoid * addr
Definition: glext.h:9621
#define NULL
Definition: types.h:112
#define PAGE_EXECUTE_READWRITE
Definition: nt_native.h:1308

◆ ~UnProtect()

UnProtect::~UnProtect ( )
inline

Definition at line 74 of file delayimp.cpp.

75  {
76  DWORD dwOld;
77  if (mAddr)
78  VirtualProtect(mAddr, 1, mProt, &dwOld);
79  }
PVOID mAddr
Definition: delayimp.cpp:81
DWORD mProt
Definition: delayimp.cpp:82
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL NTAPI VirtualProtect(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flNewProtect, OUT PDWORD lpflOldProtect)
Definition: virtmem.c:144

Member Data Documentation

◆ mAddr

PVOID UnProtect::mAddr

Definition at line 81 of file delayimp.cpp.

Referenced by UnProtect(), and ~UnProtect().

◆ mProt

DWORD UnProtect::mProt

Definition at line 82 of file delayimp.cpp.

Referenced by UnProtect(), and ~UnProtect().


The documentation for this struct was generated from the following file: