FreeRDP
environment.c File Reference
#include <winpr/crt.h>
#include <winpr/platform.h>
#include <winpr/error.h>
#include <winpr/environment.h>

Macros

#define stricmp   strcasecmp
 
#define strnicmp   strncasecmp
 

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)
 

Variables

char ** environ
 

Macro Definition Documentation

#define stricmp   strcasecmp

WinPR: Windows Portable Runtime Process Environment Functions

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2013 Thincast Technologies GmbH Copyright 2013 DI (FH) Martin Haimberger marti.nosp@m.n.ha.nosp@m.imber.nosp@m.ger@.nosp@m.thinc.nosp@m.ast..nosp@m.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.

#define strnicmp   strncasecmp

Function Documentation

char** EnvironmentBlockToEnvpA ( LPCH  lpszEnvironmentBlock)

Here is the call graph for this function:

Here is the caller graph for this function:

DWORD ExpandEnvironmentStringsA ( LPCSTR  lpSrc,
LPSTR  lpDst,
DWORD  nSize 
)
DWORD ExpandEnvironmentStringsW ( LPCWSTR  lpSrc,
LPWSTR  lpDst,
DWORD  nSize 
)
BOOL FreeEnvironmentStringsA ( LPCH  lpszEnvironmentBlock)
BOOL FreeEnvironmentStringsW ( LPWCH  lpszEnvironmentBlock)
LPSTR GetCommandLineA ( VOID  )
LPWSTR GetCommandLineW ( VOID  )

Here is the caller graph for this function:

DWORD GetCurrentDirectoryA ( DWORD  nBufferLength,
LPSTR  lpBuffer 
)

WinPR: Windows Portable Runtime Process Environment Functions

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2013 Thincast Technologies GmbH Copyright 2013 DI (FH) Martin Haimberger marti.nosp@m.n.ha.nosp@m.imber.nosp@m.ger@.nosp@m.thinc.nosp@m.ast..nosp@m.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.

Here is the call graph for this function:

DWORD GetCurrentDirectoryW ( DWORD  nBufferLength,
LPWSTR  lpBuffer 
)
LPCH GetEnvironmentStringsA ( VOID  )
LPWCH GetEnvironmentStringsW ( VOID  )
DWORD GetEnvironmentVariableA ( LPCSTR  lpName,
LPSTR  lpBuffer,
DWORD  nSize 
)

Here is the call graph for this function:

Here is the caller graph for this function:

DWORD GetEnvironmentVariableEBA ( LPCSTR  envBlock,
LPCSTR  lpName,
LPSTR  lpBuffer,
DWORD  nSize 
)

Here is the caller graph for this function:

DWORD GetEnvironmentVariableW ( LPCWSTR  lpName,
LPWSTR  lpBuffer,
DWORD  nSize 
)

Here is the call graph for this function:

LPCH MergeEnvironmentStrings ( PCSTR  original,
PCSTR  merge 
)

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)

Here is the caller graph for this function:

BOOL SetEnvironmentVariableEBA ( LPSTR *  envBlock,
LPCSTR  lpName,
LPCSTR  lpValue 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL SetEnvironmentVariableW ( LPCWSTR  lpName,
LPCWSTR  lpValue 
)

Variable Documentation

char** environ

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