Blender  V3.3
windows.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0
2  * Copyright 2019-2022 Blender Foundation */
3 
4 #ifdef _WIN32
5 # include <windows.h>
6 #endif
7 
8 #include "util/windows.h"
9 
11 
13 {
14 #ifdef _WIN32
15  HMODULE hMod = ::GetModuleHandleW(L"ntdll.dll");
16  if (hMod == 0) {
17  return false;
18  }
19 
20  typedef NTSTATUS(WINAPI * RtlGetVersionPtr)(PRTL_OSVERSIONINFOW);
21  RtlGetVersionPtr rtl_get_version = (RtlGetVersionPtr)::GetProcAddress(hMod, "RtlGetVersion");
22  if (rtl_get_version == NULL) {
23  return false;
24  }
25 
26  RTL_OSVERSIONINFOW rovi = {0};
27  rovi.dwOSVersionInfoSize = sizeof(rovi);
28  if (rtl_get_version(&rovi) != 0) {
29  return false;
30  }
31 
32  return (rovi.dwMajorVersion > major ||
33  (rovi.dwMajorVersion == major && rovi.dwBuildNumber >= build));
34 #else
35  (void)major;
36  (void)build;
37  return false;
38 #endif
39 }
40 
void build(btStridingMeshInterface *triangles, bool useQuantizedAabbCompression, const btVector3 &bvhAabbMin, const btVector3 &bvhAabbMax)
#define CCL_NAMESPACE_END
Definition: cuda/compat.h:9
SyclQueue void void size_t num_bytes void
#define L
CCL_NAMESPACE_BEGIN bool system_windows_version_at_least(int major, int build)
Definition: windows.cpp:12