 |
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: |
 |
|
|
 |
 |
| 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: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-07-12 12:00:00 | | Modified: | 2007-06-11 16:17:01 | Visited in last 7 days: 34 |