 |
GetCurrentDirectory ..msdn Add comment W32 Constants Translate this page |
 |
 |
The GetCurrentDirectory function retrieves the current directory for the current process.
|
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
DWORD GetCurrentDirectory(
DWORD nBufferLength, // size of directory buffer
LPTSTR lpBuffer // directory buffer
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER GetCurrentDirectory IN kernel32;
INTEGER nBufferLength,;
STRING @ lpBuffer
|
 |
 |
 |
| Parameters: |
 |
nBufferLength
[in] Specifies the length, in TCHARs, of the buffer for the current directory string. The buffer length must include room for a terminating null character.
lpBuffer
[out] Pointer to the buffer that receives the current directory string. This null-terminated string specifies the absolute path to the current directory. |
 |
 |
| 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: |
 |
#DEFINE MAX_PATH 260
LOCAL cBuffer, nBufsize
cBuffer = REPLICATE(CHR(0), MAX_PATH)
nBufsize = GetCurrentDirectory(Len(cBuffer), @cBuffer)
|
 |
 |
| My comment: |
 |
The difference between this function and SYS(2003) is next to negligible if any.
See also: SetCurrentDirectory, GetFullPathName |
 |
 |
| Word Index links for the GetCurrentDirectory : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-07-12 12:00:00 | | Modified: | 2009-02-05 16:08:22 | Visited in last 7 days: 15 |