windows-nt/Source/XPSP1/NT/sdktools/setuplog/dll/main.c

25 lines
473 B
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
#include <windows.h>
BOOL APIENTRY LibMain(HANDLE hModule, int nAttach, PCONTEXT pContext)
{
OSVERSIONINFO osVer;
osVer.dwOSVersionInfoSize= sizeof( osVer );
GetVersionEx( &osVer );
switch (nAttach)
{
// Only load on NT 5 or later.
case DLL_PROCESS_ATTACH:
if (osVer.dwPlatformId != VER_PLATFORM_WIN32_NT || osVer.dwMajorVersion <= 4)
{
return FALSE;
}
break;
}
return TRUE;
}