Home | History | Annotate | Download | only in include
      1 /**
      2  * This file is part of the mingw-w64 runtime package.
      3  * No warranty is given; refer to the file DISCLAIMER within this package.
      4  */
      5 
      6 #ifndef _PROCESSENV_
      7 #define _PROCESSENV_
      8 
      9 #include <apiset.h>
     10 #include <apisetcconv.h>
     11 #include <minwindef.h>
     12 
     13 #ifdef __cplusplus
     14 extern "C" {
     15 #endif
     16 
     17 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
     18   WINBASEAPI LPCH WINAPI GetEnvironmentStrings (VOID);
     19   WINBASEAPI LPWCH WINAPI GetEnvironmentStringsW (VOID);
     20   WINBASEAPI WINBOOL WINAPI SetEnvironmentStringsW (LPWCH NewEnvironment);
     21 
     22 #ifdef UNICODE
     23 #define GetEnvironmentStrings GetEnvironmentStringsW
     24 #define SetEnvironmentStrings SetEnvironmentStringsW
     25 #else
     26 #define GetEnvironmentStringsA GetEnvironmentStrings
     27 #endif
     28 
     29   WINBASEAPI WINBOOL WINAPI FreeEnvironmentStringsA (LPCH penv);
     30   WINBASEAPI WINBOOL WINAPI FreeEnvironmentStringsW (LPWCH penv);
     31   WINBASEAPI HANDLE WINAPI GetStdHandle (DWORD nStdHandle);
     32   WINBASEAPI WINBOOL WINAPI SetStdHandle (DWORD nStdHandle, HANDLE hHandle);
     33 #if _WIN32_WINNT >= 0x0600
     34   WINBASEAPI WINBOOL WINAPI SetStdHandleEx (DWORD nStdHandle, HANDLE hHandle, PHANDLE phPrevValue);
     35 #endif
     36   WINBASEAPI LPSTR WINAPI GetCommandLineA (VOID);
     37   WINBASEAPI LPWSTR WINAPI GetCommandLineW (VOID);
     38   WINBASEAPI DWORD WINAPI GetEnvironmentVariableA (LPCSTR lpName, LPSTR lpBuffer, DWORD nSize);
     39   WINBASEAPI DWORD WINAPI GetEnvironmentVariableW (LPCWSTR lpName, LPWSTR lpBuffer, DWORD nSize);
     40   WINBASEAPI WINBOOL WINAPI SetEnvironmentVariableA (LPCSTR lpName, LPCSTR lpValue);
     41   WINBASEAPI WINBOOL WINAPI SetEnvironmentVariableW (LPCWSTR lpName, LPCWSTR lpValue);
     42   WINBASEAPI DWORD WINAPI ExpandEnvironmentStringsA (LPCSTR lpSrc, LPSTR lpDst, DWORD nSize);
     43   WINBASEAPI DWORD WINAPI ExpandEnvironmentStringsW (LPCWSTR lpSrc, LPWSTR lpDst, DWORD nSize);
     44   WINBASEAPI WINBOOL WINAPI SetCurrentDirectoryA (LPCSTR lpPathName);
     45   WINBASEAPI WINBOOL WINAPI SetCurrentDirectoryW (LPCWSTR lpPathName);
     46   WINBASEAPI DWORD WINAPI GetCurrentDirectoryA (DWORD nBufferLength, LPSTR lpBuffer);
     47   WINBASEAPI DWORD WINAPI GetCurrentDirectoryW (DWORD nBufferLength, LPWSTR lpBuffer);
     48   WINBASEAPI DWORD WINAPI SearchPathW (LPCWSTR lpPath, LPCWSTR lpFileName, LPCWSTR lpExtension, DWORD nBufferLength, LPWSTR lpBuffer, LPWSTR *lpFilePart);
     49   WINBASEAPI DWORD APIENTRY SearchPathA (LPCSTR lpPath, LPCSTR lpFileName, LPCSTR lpExtension, DWORD nBufferLength, LPSTR lpBuffer, LPSTR *lpFilePart);
     50   WINBASEAPI WINBOOL WINAPI NeedCurrentDirectoryForExePathA (LPCSTR ExeName);
     51   WINBASEAPI WINBOOL WINAPI NeedCurrentDirectoryForExePathW (LPCWSTR ExeName);
     52 
     53 #define ExpandEnvironmentStrings __MINGW_NAME_AW(ExpandEnvironmentStrings)
     54 #define FreeEnvironmentStrings __MINGW_NAME_AW(FreeEnvironmentStrings)
     55 #define GetCommandLine __MINGW_NAME_AW(GetCommandLine)
     56 #define GetCurrentDirectory __MINGW_NAME_AW(GetCurrentDirectory)
     57 #define GetEnvironmentVariable __MINGW_NAME_AW(GetEnvironmentVariable)
     58 #define NeedCurrentDirectoryForExePath __MINGW_NAME_AW(NeedCurrentDirectoryForExePath)
     59 #define SearchPath __MINGW_NAME_AW(SearchPath)
     60 #define SetCurrentDirectory __MINGW_NAME_AW(SetCurrentDirectory)
     61 #define SetEnvironmentVariable __MINGW_NAME_AW(SetEnvironmentVariable)
     62 
     63 #endif
     64 
     65 #ifdef __cplusplus
     66 }
     67 #endif
     68 #endif
     69