
- cache results of CompareWindowsVersion() to shared variables to cut down on redundant calls - apply appveyor build version to artifacts (wip, could be broken) - add .gitattributes - finish patternfind.c (snr funcs unused, untested) - delete COPYING.txt (it is created from LICENSE during the build process)
26 lines
619 B
C
26 lines
619 B
C
#include <Windows.h>
|
|
#include "core.h"
|
|
#include "util.h"
|
|
#include "shared.h"
|
|
|
|
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
|
|
switch (ul_reason_for_call) {
|
|
case DLL_PROCESS_ATTACH:
|
|
{
|
|
if (!IsOperatingSystemSupported(&g_IsWindows7, &g_IsWindows8Point1)) {
|
|
return FALSE;
|
|
}
|
|
|
|
DisableThreadLibraryCalls(hModule);
|
|
HANDLE hThread = CreateThread(NULL, 0, NewThreadProc, NULL, 0, NULL);
|
|
CloseHandle(hThread);
|
|
break;
|
|
}
|
|
case DLL_PROCESS_DETACH:
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return TRUE;
|
|
}
|