windows-nt/Source/XPSP1/NT/sdktools/setuplog/dll/main.c
2020-09-26 16:20:57 +08:00

25 lines
473 B
C

#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;
}