Поделиться через


CMemFile::Detach

Call this function to get a pointer to the memory block being used by CMemFile.

BYTE * Detach( );

Возвращаемое значение

A pointer to the memory block that contains the contents of the memory file.

Заметки

Calling this function also closes the CMemFile. You can reattach the memory block to CMemFile by calling Attach. If you want to reattach the file and use the data in it, you should call CFile::GetLength to get the length of the file before calling Detach. Note that if you attach a memory block to CMemFile so that you can use its data (nGrowBytes == 0), then you won't be able to grow the memory file.

Требования

Header: afx.h

См. также

Основные понятия

CMemFile Class

CMemFile Members

Hierarchy Chart

CMemFile::Attach

CFile::GetLength