// // Copyright 2019 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // system_utils_win32.cpp: Implementation of OS-specific functions for Windows.
// First get the length of the variable, including the null terminator
result = GetEnvironmentVariableW(variableNameUtf16.c_str(), nullptr, 0);
// Zero means the variable was not found, so return now. if (result == 0)
{ return std::string();
}
// Now size the vector to fit the data, and read the environment variable.
value.resize(result, 0);
result = GetEnvironmentVariableW(variableNameUtf16.c_str(), value.data(), result);
return Narrow(value.data());
}
void *OpenSystemLibraryWithExtensionAndGetError(constchar *libraryName,
SearchType searchType,
std::string *errorOut)
{ char buffer[MAX_PATH]; int ret = snprintf(buffer, MAX_PATH, "%s.%s", libraryName, GetSharedLibraryExtension()); if (ret <= 0 || ret >= MAX_PATH)
{
fprintf(stderr, "Error loading shared library: 0x%x", ret); return nullptr;
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.20Bemerkung:
(vorverarbeitet am 2026-09-30)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.