Using Win32 functions in Visual FoxPro Image Gallery
System Information
..msdn
ExpandEnvironmentStrings
GetComputerName
GetComputerNameEx
GetComputerObjectName
GetCurrentHwProfile
GetKeyboardType
GetNativeSystemInfo
GetProductInfo
GetSysColor
GetSystemDirectory
GetSystemInfo
GetSystemMetrics
GetSystemRegistryQuota
GetSystemWow64Directory
GetUserName
GetUserNameEx
GetVersion
GetVersionEx
GetWindowsDirectory
IsNetworkAlive
SetComputerName
SetSysColors
SystemParametersInfo
Code examples:
Obtaining the System and Windows folder names
Reading data from INI files
GetWindowsDirectory
..msdn    Add comment     W32 Constants      Translate this page
The GetWindowsDirectory function retrieves the path of the Windows directory. The Windows directory contains such files as applications, initialization files, and help files.
Code examples:
Reading data from INI files
Obtaining the System and Windows folder names
Declaration:
UINT GetWindowsDirectory(
  LPTSTR lpBuffer,  // buffer for Windows directory
  UINT uSize        // size of directory buffer
);
FoxPro declaration:
DECLARE INTEGER GetWindowsDirectory IN kernel32;
    STRING @ lpBuffer,;
    INTEGER  nSize
Parameters:
lpBuffer
[out] Pointer to the buffer to receive the null-terminated string containing the path

uSize
[in] Specifies the maximum size of the buffer
Return value:
If the function succeeds, the return value specifies the number of characters written to the buffer, not including the terminating null character
Usage:
cBuffer = REPLICATE(CHR(0), 260)
nSizeRet = GetWindowsDirectory(@cBuffer, LEN(m.cBuffer))
cBuffer = SUBSTR(m.cBuffer, 1, nSizeRet)
? cBuffer
My comment:
Alternatives to calling this API function:
? GETENV("windir")
? GETENV("SystemRoot")

See also: GetSystemDirectory, SHGetFolderPath
Word Index links for the GetWindowsDirectory :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-07-12 12:00:00
Modified: 2007-06-11 16:17:01
Visited in last 7 days: 372
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.167.202.184)
4 sec.Function: 'DrawDibOpen'
7 sec.Function: 'SetWaitableTimer'
11 sec.Function: 'SHFileOperation'
15 sec.Function: 'waveInPrepareHeader'
19 sec.Function: 'GdipFillPieI'
23 sec.Function: 'GetFileTime'
27 sec.Function: 'GetSystemDefaultLCID'
31 sec.
Function group: 'Window Class'
35 sec.Function: 'waveOutClose'
40 sec.Function: 'EnumPrintProcessorDatatypes'
Google
Advertise here!