libPeConv
A library to load, manipulate, dump PE files.
Loading...
Searching...
No Matches
Namespaces | Macros | Typedefs | Functions
buffer_util.h File Reference

Definitions of the used buffer types. Functions for their allocation and deallocation. More...

#include <windows.h>

Go to the source code of this file.

Namespaces

namespace  peconv
 

Macros

#define MAX_DWORD   0xffffffff
 
#define MAX_WORD   0xffff
 
#define MASK_TO_DWORD(val)   ((val < MAX_DWORD) ? (val & MAX_DWORD) : MAX_DWORD)
 
#define MASK_TO_WORD(val)   ((val < MAX_WORD) ? (val & MAX_WORD) : MAX_WORD)
 

Typedefs

typedef PBYTE peconv::UNALIGNED_BUF
 
typedef PBYTE peconv::ALIGNED_BUF
 

Functions

bool peconv::validate_ptr (IN const void *buffer_bgn, IN size_t buffer_size, IN const void *field_bgn, IN size_t field_size)
 
UNALIGNED_BUF peconv::alloc_unaligned (size_t buf_size)
 
void peconv::free_unaligned (UNALIGNED_BUF section_buffer)
 
ALIGNED_BUF peconv::alloc_aligned (size_t buffer_size, DWORD protect, ULONGLONG desired_base=NULL)
 
bool peconv::free_aligned (ALIGNED_BUF buffer, size_t buffer_size=0)
 
ALIGNED_BUF peconv::alloc_pe_buffer (size_t buffer_size, DWORD protect, ULONGLONG desired_base=NULL)
 
bool peconv::free_pe_buffer (ALIGNED_BUF buffer, size_t buffer_size=0)
 

Detailed Description

Definitions of the used buffer types. Functions for their allocation and deallocation.

Definition in file buffer_util.h.

Macro Definition Documentation

◆ MASK_TO_DWORD

#define MASK_TO_DWORD ( val)    ((val < MAX_DWORD) ? (val & MAX_DWORD) : MAX_DWORD)

Definition at line 12 of file buffer_util.h.

◆ MASK_TO_WORD

#define MASK_TO_WORD ( val)    ((val < MAX_WORD) ? (val & MAX_WORD) : MAX_WORD)

Definition at line 13 of file buffer_util.h.

◆ MAX_DWORD

#define MAX_DWORD   0xffffffff

Definition at line 10 of file buffer_util.h.

◆ MAX_WORD

#define MAX_WORD   0xffff

Definition at line 11 of file buffer_util.h.