/
githubmirror
/
x64dbg
Обзор
Документация
Войти
/
githubmirror
/
x64dbg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
development
src/test/general/dll/main.cpp
39 строк
867 B
Duncan Ogilvie
Move tests to a separate folder
06 авг 2024, 18:52
06 авг 2024, 18:52
633a864
Код
Авторство
О чём код?
#include "main.h" char global[10] = "0"; // a sample exported function void DLL_EXPORT SomeFunction(const LPCSTR sometext) { MessageBoxA(0, sometext, "DLL Message", MB_OK | MB_ICONINFORMATION); } extern "C" DLL_EXPORT BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch(fdwReason) { case DLL_PROCESS_ATTACH: { GetTickCount(); GetCurrentProcessId(); GetCurrentProcess(); DWORD old = 0; VirtualProtect(global, 10, PAGE_GUARD, &old); asm("int3"); } break; case DLL_PROCESS_DETACH: // detach from process break; case DLL_THREAD_ATTACH: // attach to thread break; case DLL_THREAD_DETACH: // detach from thread break; } return TRUE; // succesful }