Using Win32 functions in Visual FoxPro Image Gallery
File Management
..msdn
CopyFile
CopyFileTransacted
CreateDirectory
CreateFile
CreateFileTransacted
CreateHardLink
CreateSymbolicLink
DeleteFile
DeleteFileTransacted
FindClose
FindCloseChangeNotification
FindFirstChangeNotification
FindFirstFile
FindNextChangeNotification
FindNextFile
FlushFileBuffers
GetBinaryType
GetCurrentDirectory
GetDriveType
GetFileAttributes
GetFileAttributesEx
GetFileInformationByHandle
GetFileType
GetFullPathName
GetLongPathName
GetShortPathName
GetTempFileName
GetTempPath
LockFile
MoveFile
MoveFileTransacted
OpenFile
QueryDosDevice
ReadDirectoryChangesW
ReadFile
RemoveDirectory
RemoveDirectoryTransacted
ReplaceFile
SearchPath
SetCurrentDirectory
SetEndOfFile
SetFileAttributes
SetFilePointer
SetFilePointerEx
SetSearchPathMode
UnlockFile
WriteFile
_lclose
_lopen
Code examples:
Current directory of the application
GetCurrentDirectory
..msdn    Add comment     W32 Constants      Translate this page
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
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-07-12 12:00:00
Modified: 2009-02-05 16:08:22
Visited in last 7 days: 18
User Contributed Notes:
80.126.236.224 | 2007-05-14 10:23:05
One major bonus of this function is it's case-correctness. SYS(2003) and CURDIR() both upper the result, whereas GetCurrentDirectory reports the real value.
For display purposes that's great.

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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.196.47.128)
4 sec.
Function group: 'Setup API functions'
8 sec.Function: 'recvfrom'
Function group: 'Windows Sockets 2 (Winsock)'
17 sec.
25 sec.Function: 'NetUserAdd'
Function group: 'Network Management'
29 sec.Function: 'GdipDeleteFont'
Function group: 'GDI+ Font'
34 sec.Function: 'PlaySound'
Function group: 'Windows Multimedia'
39 sec.Function: 'StrFromTimeInterval'
Function group: 'String'
43 sec.Example: 'Pocket PC: custom RAPI class for operating with files and folders on mobile device'
53 sec.Function: 'WSAStartup'
Function group: 'Windows Sockets 2 (Winsock)'
57 sec.Function: 'WSACreateEvent'
Function group: 'Windows Sockets 2 (Winsock)'
Google
Advertise here!