CInternetFile::ReadString

virtual BOOL ReadString( CString& rString );
throw ( CInternetException );

virtual LPTSTR ReadString( LPTSTR pstr, UINT nMax );
throw ( CInternetException );

Return Value

A pointer to the buffer containing the text data. NULL if end-of-file was reached without reading any data; or, if boolean, FALSE if end-of-file was reached without reading any data.

Parameters

pstr

A pointer to a string which will receive the line being read.

nMax

The maximum number of characters to be read.

rString

A reference to the CString object that receives the read line.

Remarks

Call this member function to read a stream of characters until it finds a newline character. The function places the resulting line into the memory referenced by the pstr parameter. It stops reading characters when it reaches the maximum number of characters, specified by nMax. The buffer always receives a terminating null character.

If you call ReadString without first calling SetReadBufferSize, you will get a buffer of 4096 bytes.

CInternetFile OverviewClass MembersHierarchy Chart