_fullpath_dbg
, _wfullpath_dbg
Versions of _fullpath
, _wfullpath
that use the debug version of malloc
to allocate memory.
Syntax
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_dbg
but in wide characters (wchar_t
) for _wfullpath_dbg
.
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
.
Return value
Each function returns a pointer to a buffer containing the absolute path name (absPath
). If there's an error (for example, if the value passed in relPath
includes a drive letter that isn't valid or can't be found, or if the length of the created absolute path name (absPath
) is greater than maxLength
) the function returns NULL
.
Remarks
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 don't 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 don't 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.
Generic-text routine mappings
Tchar.h routine | _UNICODE and _MBCS not defined |
_MBCS defined |
_UNICODE defined |
---|---|---|---|
_tfullpath_dbg |
_fullpath_dbg |
_fullpath_dbg |
_wfullpath_dbg |
Requirements
Function | Required header |
---|---|
_fullpath_dbg |
<crtdbg.h> |
_wfullpath_dbg |
<crtdbg.h> |
For more compatibility information, see Compatibility.
See also
File handling
_fullpath
, _wfullpath
Debug versions of heap allocation functions
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru