// example for CMemFile::CMemFile
CMemFile f; // Ready to use - no Open necessary.BYTE * pBuf = (BYTE *)new char [1024];
CMemFile g( pBuf, 1024, 256 );
// same as CMemFile g; g.Attach( pBuf, 1024, 256 );The above is copied from MSDN. You Can have a look to CMemFile::CMemFile().
*psf is sure to change, &psf and psf never change. In fact, &psf does not mean anything to you.
In your code, buffer's address never changes, and it's attached with psf.
For more details, you can write a console application to have a test.
CMemFile f; // Ready to use - no Open necessary.BYTE * pBuf = (BYTE *)new char [1024];
CMemFile g( pBuf, 1024, 256 );
// same as CMemFile g; g.Attach( pBuf, 1024, 256 );The above is copied from MSDN. You Can have a look to CMemFile::CMemFile().
*psf is sure to change, &psf and psf never change. In fact, &psf does not mean anything to you.
In your code, buffer's address never changes, and it's attached with psf.
For more details, you can write a console application to have a test.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货