2019-01-19 08:40:42 +08:00
|
|
|
/*
|
2021-05-17 02:51:16 +08:00
|
|
|
* Copyright (C) 2020-2021 Intel Corporation
|
2019-01-19 08:40:42 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-03-10 17:02:43 +08:00
|
|
|
#include "shared/source/os_interface/windows/environment_variables.h"
|
2019-01-19 08:40:42 +08:00
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/debug_settings/debug_settings_manager.h"
|
2019-01-19 08:40:42 +08:00
|
|
|
|
2020-11-09 19:38:53 +08:00
|
|
|
#include <windows.h>
|
2019-01-19 08:40:42 +08:00
|
|
|
|
|
|
|
uint32_t getEnvironmentVariable(const char *name, char *outBuffer, uint32_t outBufferSize) {
|
2019-03-26 18:59:46 +08:00
|
|
|
if (NEO::DebugManager.registryReadAvailable() == false) {
|
2019-01-19 08:40:42 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return GetEnvironmentVariableA(name, outBuffer, outBufferSize);
|
|
|
|
}
|