For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
Debug versions of the _getdcwd, _wgetdcwd functions (only available during debug).
char *_getdcwd_dbg( int drive, char *buffer, int maxlen, int blockType, const char *filename, int linenumber ); wchar_t *_wgetdcwd_dbg( int drive, wchar_t *buffer, int maxlen, int blockType, const char *filename, int linenumber );
Name of the disk drive.
Storage location for the path.
Maximum length of the path in characters:
Requested type of the memory block:
Pointer to the name of the source file that requested the allocation operation or
Line number in the source file where the allocation operation was requested or
Returns a pointer to
NULL return value indicates an error, and
errno is set either to
ENOMEM, indicating that there is insufficient memory to allocate
maxlen bytes (when a
NULL argument is given as
buffer), or to
ERANGE, indicating that the path is longer than
maxlen characters. For more information, see errno, _doserrno, _sys_errlist, and _sys_nerr.
_wgetdcwd_dbg functions are identical to
_wgetdcwd except that, when
_DEBUG is defined, these functions use the debug version of
_malloc_dbg to allocate memory if
NULL is passed as the
buffer parameter. For more information, see _malloc_dbg.
You do not need to call these functions explicitly in most cases. Instead, you can define the
_CRTDBG_MAP_ALLOC flag. When
_CRTDBG_MAP_ALLOC is defined, calls to
_wgetdcwd are remapped to
_wgetdcwd_dbg, respectively, with the
blockType set to
_NORMAL_BLOCK. Thus, you do not need to call these functions explicitly unless you want to mark the heap blocks as
_CLIENT_BLOCK. For more information, see Types of Blocks on the Debug Heap.
|Tchar.h routine||_UNICODE and _MBCS not defined||_MBCS defined||_UNICODE defined|
For more compatibility information, see Compatibility in the Introduction.