_fullpath_dbg, _wfullpath_dbg

使用 malloc 的调试版本中分配内存 _fullpath, _wfullpath 的版本。

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 
);

参数

  • absPath
    对包含绝对或完整路径名的缓冲区的指针或 NULL。

  • relPath
    相对路径名称。

  • maxLength
    绝对路径名缓冲区 (absPath) 的最大长度。 此长度。 _fullpath 的字节,但在宽字符 (wchar_t) _wfullpath的。

  • blockType
    请求的内存块类型: _CLIENT_BLOCK 或 _NORMAL_BLOCK。

  • filename
    对请求分配操作或 NULL源文件的名称的指针。

  • linenumber
    在分配请求的操作或 NULL的源文件中的行号。

返回值

每个函数返回指向包含绝对路径名 (absPath) 的缓冲区。 如果存在错误 (例如,因此,如果在 relPath 传递的值包括无效或无法找到的驱动器号,或者,如果创建的绝对路径名 (absPath) 的长度大于 maxLength) 函数返回 NULL。

备注

_fullpath_dbg 和 _wfullpath_dbg 功能与 _fullpath 和 _wfullpath 相同,区别在于,那么,当 **_**DEBUG定义时,这些功能使用 malloc, _malloc_dbg的调试版本,分配内存,如果为 null 将作为第一个参数。 有关 _malloc_dbg的信息调试功能,请参见 _malloc_dbg

您不需要显式调用这些函数在许多情况下。 相反,您可以定义 _CRTDBG_MAP_ALLOC 标志。 当 _CRTDBG_MAP_ALLOC定义时,对 _fullpath ,并 _wfullpath已重新映射到 _fullpath_dbg 和 _wfullpath_dbg,分别,并 blockType 设置为 _NORMAL_BLOCK。 因此,,除非要标记堆块作为 _CLIENT_BLOCK,则无需显式调用这些函数。 有关更多信息,请参见 调试堆中的块类型

一般文本例程映射

Tchar.h 实例

未定义的 _UNICODE 和 _MBCS

定义的 _MBCS

定义的 _UNICODE

_tfullpath_dbg

_fullpath_dbg

_fullpath_dbg

_wfullpath_dbg

要求

功能

必需的头

_fullpath_dbg

crtdbg.h

_wfullpath_dbg

crtdbg.h

有关更多兼容性信息,请参见中介绍的 兼容性

.NET Framework 等效项

Create

请参见

参考

文件处理

_fullpath, _wfullpath

概念

堆分配函数的“Debug”版本