共用方式為


CSharedFile::SetHandle

Call this function to attach a block of global memory to the CSharedFile object.

void SetHandle( 
   HGLOBAL hGlobalMemory, 
   BOOL bAllowGrow = TRUE  
);

Parameters

  • hGlobalMemory
    Handle to the global memory to be attached to the CSharedFile.

  • bAllowGrow
    Specifies whether the memory block is allowed to grow.

Remarks

If bAllowGrow is nonzero, the size of the memory block is increased as necessary, for example, if an attempt is made to write more bytes to the file than were allocated for the memory block.

Requirements

Header: afxadv.h

See Also

Reference

CSharedFile Class

Hierarchy Chart

CSharedFile::CSharedFile

CSharedFile::Detach