_fullpath_dbg, _wfullpath_dbg
Versions of _fullpath, _wfullpath that use the debug version of malloc to allocate memory.
char *_fullpath_dbg( char *absPath, const char *relPath, size_t maxLength, int blockType, const char *filename, int linenumber ); wchar_t *_wfullpath_dbg( wchar_t *absPath, const wchar_t *relPath, size_t maxLength, int blockType, const char *filename, int linenumber );
Parameters
- absPath
-
Pointer to a buffer containing the absolute or full path name, or NULL.
- relPath
-
Relative path name.
- maxLength
-
Maximum length of the absolute path name buffer (absPath). This length is in bytes for _fullpath but in wide characters (wchar_t) for _wfullpath.
- blockType
-
Requested type of memory block: _CLIENT_BLOCK or _NORMAL_BLOCK.
- filename
-
Pointer to the name of the source file that requested allocation operation or NULL.
- linenumber
-
Line number in the source file where the allocation operation was requested or NULL.
Each function returns a pointer to a buffer containing the absolute path name (absPath). If there is an error (for example, if the value passed in relPath includes a drive letter that is not valid or cannot be found, or if the length of the created absolute path name (absPath) is greater than maxLength) the function returns NULL.
The _fullpath_dbg and _wfullpath_dbg functions are identical to _fullpath and _wfullpath except that, when _DEBUG is defined, these functions use the debug version of malloc, _malloc_dbg, to allocate memory if NULL is passed as the first parameter. For information on the debugging features of _malloc_dbg, 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 _fullpath and _wfullpath are remapped to _fullpath_dbg and _wfullpath_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 |
|---|---|---|---|
| _tfullpath_dbg | _fullpath_dbg | _fullpath_dbg | _wfullpath_dbg |
| Function | Required header | Compatibility |
|---|---|---|
| _fullpath_dbg | <crtdbg.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _wfullpath_dbg | <crtdbg.h> | Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
For more compatibility information, see Compatibility in the Introduction.