#include <Windows.h> DWORD WINAPI MainThread(LPVOID lpReserved) { LPCTSTR strSbieDll = L"SbieDll.dll"; HMODULE hSbieModule = GetModuleHandle(strSbieDll); if (hSbieModule != NULL) { FreeLibrary(hSbieModule); } return TRUE; } BOOL APIENTRY DllMain( HMODULE hModule, DWORD dwReason,LPVOID lpReserved) { switch (dwReason) { case DLL_PROCESS_ATTACH: { DisableThreadLibraryCalls(hModule); CreateThread(nullptr, 0, MainThread, hModule, 0, nullptr); break; } case DLL_PROCESS_DETACH: { break; } } return TRUE; }