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