i recommand you to use IStream with replace STL fstream.
to LeighSword(Sword) :你说的CAtlFile在哪个文件里呀。
CAtlFile ClassSee Also Marquee Sample | MantaWeb SampleClass Members | ATL Class Overview | CHandle Requirements Header: atlfile.h This class provides a thin wrapper around the Windows file-handling API.class CAtlFile : public CHandle Res Use this class when file-handling needs are relatively simple, but more abstraction than the Windows API provides is required, without including MFC dependencies.Requirements Header: atlfile.h
Why doesn't use vs.net, must is native C++(non-MC++) with when the code release only must msvcr6.Dll and msvcp6.Dll replaces msvcr7x.Dll and msvcp7x.Dll, but I think in ATL uses MFC is not the ATL original intention that make components as fast as small as possible.
Marquee Sample | MantaWeb SampleClass Members | ATL Class Overview | CHandle
Requirements
Header: atlfile.h
This class provides a thin wrapper around the Windows file-handling API.class CAtlFile : public CHandle
Res
Use this class when file-handling needs are relatively simple, but more abstraction than the Windows API provides is required, without including MFC dependencies.Requirements
Header: atlfile.h
这个文件是在哪?我在Visual C++6.0和WTL7.0下都没找到。
我觉得在ATL中也可用VC中的CFile这个类
只要你的ATL支持MFC就可以了
我用 FILE * fp;
fopen,fread,fwrite等