IAtlStringMgr::Allocate

分配一个新字符串数据结构。

CStringData* Allocate(
   int nAllocLength,
   int nCharSize 
) throw( );

参数

  • nAllocLength
    字符数在新的内存块。

  • nCharSize
    大小(以字节字符串管理器使用的每个字符类型。

返回值

返回指向新分配的内存块。

备注

不通过引发异常通知一个失败的分配。相反,应将返回 NULL终止一个失败的分配。

备注

调用 IAtlStringMgr::FreeIAtlStringMgr::ReAllocate 释放此方法分配的内存。

备注

有关用法示例,请参见 内存管理和CStringT

要求

Header: atlsimpstr.h

请参见

参考

IAtlStringMgr选件类