Skip to content

Files

Latest commit

 

History

History
56 lines (36 loc) · 1.49 KB

GetCurrentDirectory.md

File metadata and controls

56 lines (36 loc) · 1.49 KB

Home

Function name : GetCurrentDirectory

Group: File Management - Library: kernel32


The GetCurrentDirectory function retrieves the current directory for the current process.


Code examples:

Current directory of the application

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


Comments:

The difference between this function and SYS(2003) is next to negligible if any.

See also: SetCurrentDirectory, GetFullPathName.