领测软件测试网
软件测试技术门户`iL%V0jb(ZlM%?G!kGVY+f u8h'J5uKy2~cs#HHRESULT CSequentialStream::PreAllocBuffer( ULONG uSize )
软件测试技术门户2nv_"u
|)@[0{zm{
软件测试技术门户%|{:P7V4@2x%_7t8pE.Tu&D if( m_uBufferSize < uSize )
软件测试技术门户S:u/n3t'D|g] {
软件测试技术门户W8EWO$w)G)`#Q^ps m_uBufferSize = uSize;
'GbN [L,H)eG{2A0G m_pBuffer = CoTaskMemRealloc( m_pBuffer, m_uBufferSize );
pt6Y,zVg~ if( m_pBuffer == NULL )
LOBB;FZ
i {
/h1[i/A'g(Y~"o8e Clear( );
VlX*P+J0Ul3u return STG_E_INSUFFICIENTMEMORY;
:N:L"B0E7mg }
Z+hk,^~l8W
Qg3a*y }
m.|"]:PF"Cx]? return S_OK;
hD Ap ~k7E){}
p.{4hX!y,J/j]w7D Z6j iHRESULT CSequentialStream::Read( void* pv, ULONG cb, ULONG* pcbRead )
软件测试技术门户zkd6AN Y)T{
软件测试技术门户R$F&z8Fs$F"r ( pcbRead != NULL ? ( * pcbRead = 0U ) : 0 );
/L*|z2zV if( pv == NULL ) { return STG_E_INVALIDPOINTER; }
软件测试技术门户#X6`q{$O'tP:h3k if( cb == 0U ) { return S_OK; }
软件测试技术门户 ~/iUKK
z软件测试技术门户Tf0yN\ ASSERT( m_uPosition <= m_uBufferUsed );
软件测试技术门户iG
Bt-n8fMb(w-fGna ULONG uBytesLeft = m_uBufferUsed - m_uPosition;
DiJ1hL#K9N%k-p4wc,iX
_%A if( uBytesLeft == 0U ) { return S_FALSE; } //no more bytes
软件测试技术门户B&Wa,mh3}T软件测试技术门户"z}NHsz$m ULONG uBytesRead = ( cb > uBytesLeft ? uBytesLeft : cb );
#e