Complete ATL and C++ beginner here. (warning)<BR><BR>I am trying to read a file into a BSTR in an ATL based component and return the BSTR to an asp page. So far I&#039ve had limited success by reading file content into a character array then constructing a BSTR from the char array. However, I&#039m approaching this all wrong because the BSTR contains all the characters that were in the original char array past the end of the file. How do I read directly into a BSTR or CComBSTR only the file content?<BR><BR>Here&#039s what I have so far:<BR><BR>STDMETHODIMP CTest::ReadFile(BSTR *content)<BR> { <BR> char c[10000];<BR> char fileName[] = "file.txt";<BR> ifstream fin(fileName);<BR> if (fin), sizeof(c));<BR> CComBSTR cb (c);<BR> *content = cb;<BR><BR> return S_OK;<BR> }<BR><BR>any help appreciated!