FreeRDP
|
#include <winpr/config.h>
#include <winpr/crt.h>
#include <winpr/platform.h>
#include <winpr/error.h>
#include <winpr/string.h>
#include <winpr/environment.h>
Functions | |
DWORD | GetCurrentDirectoryA (DWORD nBufferLength, LPSTR lpBuffer) |
DWORD | GetCurrentDirectoryW (DWORD nBufferLength, LPWSTR lpBuffer) |
BOOL | SetCurrentDirectoryA (LPCSTR lpPathName) |
BOOL | SetCurrentDirectoryW (LPCWSTR lpPathName) |
DWORD | SearchPathA (LPCSTR lpPath, LPCSTR lpFileName, LPCSTR lpExtension, DWORD nBufferLength, LPSTR lpBuffer, LPSTR *lpFilePart) |
DWORD | SearchPathW (LPCWSTR lpPath, LPCWSTR lpFileName, LPCWSTR lpExtension, DWORD nBufferLength, LPWSTR lpBuffer, LPWSTR *lpFilePart) |
LPSTR | GetCommandLineA (VOID) |
LPWSTR | GetCommandLineW (VOID) |
BOOL | NeedCurrentDirectoryForExePathA (LPCSTR ExeName) |
BOOL | NeedCurrentDirectoryForExePathW (LPCWSTR ExeName) |
DWORD | GetEnvironmentVariableA (LPCSTR lpName, LPSTR lpBuffer, DWORD nSize) |
DWORD | GetEnvironmentVariableW (LPCWSTR lpName, LPWSTR lpBuffer, DWORD nSize) |
BOOL | SetEnvironmentVariableA (LPCSTR lpName, LPCSTR lpValue) |
BOOL | SetEnvironmentVariableW (LPCWSTR lpName, LPCWSTR lpValue) |
LPCH | GetEnvironmentStringsA (VOID) |
LPWCH | GetEnvironmentStringsW (VOID) |
BOOL | SetEnvironmentStringsA (LPCH NewEnvironment) |
BOOL | SetEnvironmentStringsW (LPWCH NewEnvironment) |
DWORD | ExpandEnvironmentStringsA (LPCSTR lpSrc, LPSTR lpDst, DWORD nSize) |
DWORD | ExpandEnvironmentStringsW (LPCWSTR lpSrc, LPWSTR lpDst, DWORD nSize) |
BOOL | FreeEnvironmentStringsA (LPCH lpszEnvironmentBlock) |
BOOL | FreeEnvironmentStringsW (LPWCH lpszEnvironmentBlock) |
LPCH | MergeEnvironmentStrings (PCSTR original, PCSTR merge) |
DWORD | GetEnvironmentVariableEBA (LPCSTR envBlock, LPCSTR lpName, LPSTR lpBuffer, DWORD nSize) |
BOOL | SetEnvironmentVariableEBA (LPSTR *envBlock, LPCSTR lpName, LPCSTR lpValue) |
char ** | EnvironmentBlockToEnvpA (LPCH lpszEnvironmentBlock) |
DWORD | GetEnvironmentVariableX (const char *lpName, char *lpBuffer, DWORD nSize) |
Variables | |
char ** | environ |
char** EnvironmentBlockToEnvpA | ( | LPCH | lpszEnvironmentBlock | ) |
DWORD ExpandEnvironmentStringsA | ( | LPCSTR | lpSrc, |
LPSTR | lpDst, | ||
DWORD | nSize | ||
) |
DWORD ExpandEnvironmentStringsW | ( | LPCWSTR | lpSrc, |
LPWSTR | lpDst, | ||
DWORD | nSize | ||
) |
BOOL FreeEnvironmentStringsA | ( | LPCH | lpszEnvironmentBlock | ) |
A brief history of the GetEnvironmentStrings functions: http://blogs.msdn.com/b/oldnewthing/archive/2013/01/17/10385718.aspx
BOOL FreeEnvironmentStringsW | ( | LPWCH | lpszEnvironmentBlock | ) |
LPSTR GetCommandLineA | ( | VOID | ) |
LPWSTR GetCommandLineW | ( | VOID | ) |
DWORD GetCurrentDirectoryA | ( | DWORD | nBufferLength, |
LPSTR | lpBuffer | ||
) |
WinPR: Windows Portable Runtime Process Environment Functions
Copyright 2012 Marc-Andre Moreau marca Copyright 2013 Thincast Technologies GmbH Copyright 2013 DI (FH) Martin Haimberger ndre .more au@g mail. commarti n.ha imber ger@ thinc ast. com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
DWORD GetCurrentDirectoryW | ( | DWORD | nBufferLength, |
LPWSTR | lpBuffer | ||
) |
LPCH GetEnvironmentStringsA | ( | VOID | ) |
LPWCH GetEnvironmentStringsW | ( | VOID | ) |
DWORD GetEnvironmentVariableA | ( | LPCSTR | lpName, |
LPSTR | lpBuffer, | ||
DWORD | nSize | ||
) |
DWORD GetEnvironmentVariableEBA | ( | LPCSTR | envBlock, |
LPCSTR | lpName, | ||
LPSTR | lpBuffer, | ||
DWORD | nSize | ||
) |
DWORD GetEnvironmentVariableW | ( | LPCWSTR | lpName, |
LPWSTR | lpBuffer, | ||
DWORD | nSize | ||
) |
DWORD GetEnvironmentVariableX | ( | const char * | lpName, |
char * | lpBuffer, | ||
DWORD | nSize | ||
) |
LPCH MergeEnvironmentStrings | ( | PCSTR | original, |
PCSTR | merge | ||
) |
BOOL NeedCurrentDirectoryForExePathA | ( | LPCSTR | ExeName | ) |
BOOL NeedCurrentDirectoryForExePathW | ( | LPCWSTR | ExeName | ) |
DWORD SearchPathA | ( | LPCSTR | lpPath, |
LPCSTR | lpFileName, | ||
LPCSTR | lpExtension, | ||
DWORD | nBufferLength, | ||
LPSTR | lpBuffer, | ||
LPSTR * | lpFilePart | ||
) |
DWORD SearchPathW | ( | LPCWSTR | lpPath, |
LPCWSTR | lpFileName, | ||
LPCWSTR | lpExtension, | ||
DWORD | nBufferLength, | ||
LPWSTR | lpBuffer, | ||
LPWSTR * | lpFilePart | ||
) |
BOOL SetCurrentDirectoryA | ( | LPCSTR | lpPathName | ) |
BOOL SetCurrentDirectoryW | ( | LPCWSTR | lpPathName | ) |
BOOL SetEnvironmentStringsA | ( | LPCH | NewEnvironment | ) |
BOOL SetEnvironmentStringsW | ( | LPWCH | NewEnvironment | ) |
BOOL SetEnvironmentVariableA | ( | LPCSTR | lpName, |
LPCSTR | lpValue | ||
) |
BOOL SetEnvironmentVariableEBA | ( | LPSTR * | envBlock, |
LPCSTR | lpName, | ||
LPCSTR | lpValue | ||
) |
BOOL SetEnvironmentVariableW | ( | LPCWSTR | lpName, |
LPCWSTR | lpValue | ||
) |
|
extern |
GetEnvironmentStrings function: http://msdn.microsoft.com/en-us/library/windows/desktop/ms683187/
The GetEnvironmentStrings function returns a pointer to a block of memory that contains the environment variables of the calling process (both the system and the user environment variables). Each environment block contains the environment variables in the following format:
Var1=Value1\0 Var2=Value2\0 Var3=Value3\0 ... VarN=ValueN\0\0