 |
SetEnvironmentVariable ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The SetEnvironmentVariable function sets the value of an environment variable for the current process. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL SetEnvironmentVariable(
LPCTSTR lpName, // environment variable name
LPCTSTR lpValue // new value for variable
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER SetEnvironmentVariable IN kernel32;
STRING lpName,;
STRING lpValue
|
 |
 |
 |
| Parameters: |
 |
lpName
[in] Pointer to a null-terminated string that specifies the environment variable whose value is being set.
lpValue
[in] Pointer to a null-terminated string containing the new value of the specified environment variable. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is nonzero. |
 |
 |
| My comment: |
 |
This function has no effect on the system environment variables or the environment variables of other processes.
FoxPro GETENV() function, most likely, retrieves values from an internal array or collection populated during FoxPro shell or application startup. So when you use this API function to add or modify environment variables, the GETENV() may not become aware of this change. |
 |
 |
| Word Index links for the SetEnvironmentVariable : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-09-18 12:00:00 | | Modified: | 2005-09-26 18:47:48 | Visited in last 7 days: 19 |