79 _In_opt_ SIZE_T HeapReserveSize,
80 _In_opt_ SIZE_T HeapCommitSize
86 HeapReserveSize ? HeapReserveSize : 2 * 1024 * 1024,
87 HeapCommitSize ? HeapCommitSize : 1024 * 1024,
93 return STATUS_INSUFFICIENT_RESOURCES;
101 return STATUS_UNSUCCESSFUL;
104 return STATUS_UNSUCCESSFUL;
106 return STATUS_UNSUCCESSFUL;
111 return STATUS_UNSUCCESSFUL;
113 return STATUS_SUCCESS;
121 static BOOLEAN valid =
FALSE;
122 static BOOLEAN isWow64;
207 RTL_OSVERSIONINFOEXW versionInfo;
211 versionInfo.dwOSVersionInfoSize =
sizeof(RTL_OSVERSIONINFOEXW);
224 memcpy(&
PhOsVersion, &versionInfo,
sizeof(RTL_OSVERSIONINFOEXW));
225 majorVersion = versionInfo.dwMajorVersion;
226 minorVersion = versionInfo.dwMinorVersion;
228 if (majorVersion == 5 && minorVersion < 1 || majorVersion < 5)
233 else if (majorVersion == 5 && minorVersion == 1)
238 else if (majorVersion == 5 && minorVersion == 2)
243 else if (majorVersion == 6 && minorVersion == 0)
248 else if (majorVersion == 6 && minorVersion == 1)
253 else if (majorVersion == 6 && minorVersion == 2)
258 else if (majorVersion == 6 && minorVersion == 3)
263 else if (majorVersion == 10 && minorVersion == 0)
267 else if (majorVersion == 10 && minorVersion > 0 || majorVersion > 10)