共用方式為


CMemFile::Realloc

This function is called by CMemFile member functions.

virtual BYTE* Realloc(
   BYTE* lpMem,
   SIZE_T nBytes 
);

Parameters

  • lpMem
    A pointer to the memory block to be reallocated.

  • nBytes
    New size for the memory block.

Return Value

A pointer to the memory block that was reallocated (and possibly moved), or NULL if the reallocation failed.

Remarks

Override this function to implement custom memory reallocation. If you override this function, you'll probably want to override Alloc and Free as well.

Requirements

Header: afx.h

See Also

Concepts

CMemFile Class

CMemFile Members

Hierarchy Chart

CMemFile::Alloc

CMemFile::Free