You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
443 B
14 lines
443 B
#pragma once
|
|
#include <Windows.h>
|
|
#include <cstddef>
|
|
#include <intrin.h>
|
|
|
|
extern "C" void unload_and_free(void* base, std::size_t size, void* zero_memory, void* return_addr);
|
|
#define ZERO_DLL(image_base, image_size) \
|
|
unload_and_free(image_base, image_size, GetProcAddress(GetModuleHandleA("ntdll.dll"), "RtlZeroMemory"), _ReturnAddress());
|
|
|
|
typedef struct _image_data
|
|
{
|
|
void* image_base;
|
|
std::size_t image_size;
|
|
}image_data, * pimage_data; |