#ifdef _MSC_VER
#pragma once
#endif // _MSC_VER
#ifndef _PROCESSENV_
#define _PROCESSENV_
#include <apiset.h>
#include <apisetcconv.h>
#include <minwindef.h>
#ifdef __cplusplus
extern
"C"
{
#endif
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
_In_ _Pre_ _NullNull_terminated_ LPWCH NewEnvironment
);
#ifdef UNICODE
#define SetEnvironmentStrings SetEnvironmentStringsW
#endif
#endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#pragma endregion
#pragma region PC Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PC_APP | WINAPI_PARTITION_SYSTEM)
(
);
(
);
#if (_WIN32_WINNT >= 0x0600)
(
_Out_opt_ PHANDLE phPrevValue
);
#endif // _WIN32_WINNT >= 0x0600
#endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PC_APP | WINAPI_PARTITION_SYSTEM)
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
(
);
(
);
#ifdef UNICODE
#define GetCommandLine GetCommandLineW
#else
#define GetCommandLine GetCommandLineA
#endif // !UNICODE
_NullNull_terminated_
(
);
_NullNull_terminated_
(
);
#ifdef UNICODE
#define GetEnvironmentStrings GetEnvironmentStringsW
#else
#define GetEnvironmentStringsA GetEnvironmentStrings
#endif // !UNICODE
(
_In_ _Pre_ _NullNull_terminated_ LPCH penv
);
(
_In_ _Pre_ _NullNull_terminated_ LPWCH penv
);
#ifdef UNICODE
#define FreeEnvironmentStrings FreeEnvironmentStringsW
#else
#define FreeEnvironmentStrings FreeEnvironmentStringsA
#endif // !UNICODE
_Success_(return != 0 && return < nSize)
(
_Out_writes_to_opt_(nSize,return + 1) LPSTR lpBuffer,
);
_Success_(return != 0 && return < nSize)
(
_Out_writes_to_opt_(nSize,return + 1) LPWSTR lpBuffer,
);
#ifdef UNICODE
#define GetEnvironmentVariable GetEnvironmentVariableW
#else
#define GetEnvironmentVariable GetEnvironmentVariableA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define SetEnvironmentVariable SetEnvironmentVariableW
#else
#define SetEnvironmentVariable SetEnvironmentVariableA
#endif // !UNICODE
_Success_(return != 0 && return <= nSize)
ExpandEnvironmentStringsA
(
_Out_writes_to_opt_(nSize,return) LPSTR lpDst,
);
_Success_(return != 0 && return <= nSize)
ExpandEnvironmentStringsW
(
_Out_writes_to_opt_(nSize,return) LPWSTR lpDst,
);
#ifdef UNICODE
#define ExpandEnvironmentStrings ExpandEnvironmentStringsW
#else
#define ExpandEnvironmentStrings ExpandEnvironmentStringsA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define SetCurrentDirectory SetCurrentDirectoryW
#else
#define SetCurrentDirectory SetCurrentDirectoryA
#endif // !UNICODE
_Success_(return != 0 && return < nBufferLength)
(
_In_ DWORD nBufferLength,
_Out_writes_to_opt_(nBufferLength,return + 1) LPSTR lpBuffer
);
_Success_(return != 0 && return < nBufferLength)
(
_In_ DWORD nBufferLength,
_Out_writes_to_opt_(nBufferLength,return + 1) LPWSTR lpBuffer
);
#ifdef UNICODE
#define GetCurrentDirectory GetCurrentDirectoryW
#else
#define GetCurrentDirectory GetCurrentDirectoryA
#endif // !UNICODE
#endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
(
_In_opt_ LPCWSTR lpExtension,
_In_ DWORD nBufferLength,
_Out_writes_to_opt_(nBufferLength,return + 1) LPWSTR lpBuffer,
_Out_opt_ LPWSTR* lpFilePart
);
#ifdef UNICODE
#define SearchPath SearchPathW
#else
#define SearchPath SearchPathA
#endif // !UNICODE
(
_In_opt_ LPCSTR lpExtension,
_In_ DWORD nBufferLength,
_Out_writes_to_opt_(nBufferLength,return + 1) LPSTR lpBuffer,
_Out_opt_ LPSTR* lpFilePart
);
#if _WIN32_WINNT >= 0x0502
NeedCurrentDirectoryForExePathA
(
);
NeedCurrentDirectoryForExePathW
(
);
#ifdef UNICODE
#define NeedCurrentDirectoryForExePath NeedCurrentDirectoryForExePathW
#else
#define NeedCurrentDirectoryForExePath NeedCurrentDirectoryForExePathA
#endif // !UNICODE
#endif // _WIN32_WINNT >= 0x0502
#endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#pragma endregion
#ifdef __cplusplus
}
#endif
#endif // _PROCESSENV_