示例#1
0
文件: MSXML.hpp 项目: dmit25/nwlibs
inline void ReadBSTRFromStream( std::basic_istream< CharT, CharTraitsT > &Istream, ATL::CComBSTR &Str )
{ 
   Str.Empty();

   CharT Buff[256];

   do 
   {
      Istream.read( Buff, APL_ARRSIZE(Buff) );
      ATL::CComBSTR TmpStr(Istream.gcount(), Buff);
      Str.Append(TmpStr);   

   } while(Istream.gcount() == APL_ARRSIZE(Buff));
}
示例#2
0
文件: MSXML.hpp 项目: dmit25/nwlibs
inline void ReadBSTRFromStream( std::basic_istream< WCHAR, CharTraitsT > &Istream, ATL::CComBSTR &Str )
{ 
   //Оптимизация исключающая временные объекты
   Str.Empty();

   WCHAR Buff[256];

   do 
   {
      Istream.read( Buff, APL_ARRSIZE(Buff) );
      Str.Append(Buff, Istream.gcount());   

   }
   while(Istream.gcount() == APL_ARRSIZE(Buff));

}