Using Win32 functions in Visual FoxPro Image Gallery
Process and Thread
..msdn
AssignProcessToJobObject
CommandLineToArgvW
CreateJobObject
CreateProcess
CreateProcessAsUser
CreateProcessWithLogonW
ExitProcess
FreeEnvironmentStrings
GetCommandLine
GetCurrentProcess
GetCurrentProcessId
GetCurrentThread
GetCurrentThreadId
GetEnvironmentStrings
GetEnvironmentVariable
GetPriorityClass
GetProcessIoCounters
GetProcessTimes
GetProcessVersion
GetStartupInfo
GetThreadPriority
IsWow64Process
OpenProcess
RegisterServiceProcess
SetEnvironmentVariable
SetPriorityClass
SetThreadPriority
Sleep
TerminateJobObject
TerminateProcess
WinExec
Code examples:
Reading and setting Environment variables
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:
Reading and setting Environment variables
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-09-18 12:00:00
Modified: 2005-09-26 18:47:48
Visited in last 7 days: 29
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.80.140.5)
14 sec.Function: 'GetWindowInfo'
Function group: 'Window'
30 sec.Function: 'GetFileInformationByHandle'
Function group: 'File Management'
46 sec.
Function group: 'Device Input and Output'
1.03 min.Function: 'MoveFileTransacted'
Function group: 'File Management'
1.25 min.
Function group: 'Event Logging'
1.5 min.Links
1.75 min.
Function group: 'ODBC API'
1.97 min.
Function group: 'Monitor Configuration (Vista)'
2.2 min.
Function group: 'Path'
2.47 min.Function: 'IsWow64Process'
Function group: 'Process and Thread'
Google
Advertise here!