environment access functionsthe functions in this section allow to access (get) or change value of environment variables in a portable way. they are currently implemented under win32 and posix-like systems (unix). include files <wx/utils.h>
wxgetenv
wxgetenvwxchar * wxgetenv(const wxstring& var) this is a macro defined as getenv() or its wide char version in unicode mode. note that under win32 it may not return correct value for the variables set with wxsetenv, use wxgetenv function instead.
wxgetenvbool wxgetenv(const wxstring& var, wxstring *value) returns the current value of the environment variable var in value. value may be null if you just want to know if the variable exists and are not interested in its value. returns true if the variable exists, false otherwise.
wxsetenvbool wxsetenv(const wxstring& var, const wxchar *value) sets the value of the environment variable var (adding it if necessary) to value. returns true on success.
wxunsetenvbool wxunsetenv(const wxstring& var) removes the variable var from the environment. wxgetenv will return null after the call to this function. returns true on success. |