Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
473 B

  1. #include <windows.h>
  2. BOOL APIENTRY LibMain(HANDLE hModule, int nAttach, PCONTEXT pContext)
  3. {
  4. OSVERSIONINFO osVer;
  5. osVer.dwOSVersionInfoSize= sizeof( osVer );
  6. GetVersionEx( &osVer );
  7. switch (nAttach)
  8. {
  9. // Only load on NT 5 or later.
  10. case DLL_PROCESS_ATTACH:
  11. if (osVer.dwPlatformId != VER_PLATFORM_WIN32_NT || osVer.dwMajorVersion <= 4)
  12. {
  13. return FALSE;
  14. }
  15. break;
  16. }
  17. return TRUE;
  18. }