Re: IStream.Read()



"Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:uPeoBdlkHHA.4676@xxxxxxxxxxxxxxxxxxxxxxx
Read allows the last pointer passed in to be null. From the documentation for IStream from the Platform SDK:

pcbRead
[out] A pointer to a ULONG variable that receives the actual number of bytes read from the stream object.
You can set this pointer to NULL. In this case, this method does not return the number of bytes read.



From the latest greatest Windows SDK docs:

pcbRead
[out] A pointer to a ULONG variable that receives the actual number of bytes read from the stream object.

and from MSDN:
http://msdn2.microsoft.com/en-us/library/aa380011.aspx

http://msdn2.microsoft.com/en-us/library/system.runtime.interopservices.comtypes.istream.read.aspx

Note this:
For more information, see the existing documentation for ISequentialStream::Read in the MSDN library.

You see, nothing about NULL to be allowed.

This :
http://msdn2.microsoft.com/en-us/library/ms890697.aspx

effectively talks about NULL to be allowed....
<snip
pcbRead
[out] Pointer to a ULONG variable that receives the actual number of bytes read from the stream object.
You can set this pointer to NULL to indicate that you are not interested in this value. In this case, this method does not provide the actual number of bytes read.
/snip>

but this is about the ole32 implementation for Windows CE.

Willy.



.



Relevant Pages

  • Re: Inserting/Updating text data type fields
    ... Access and Modify SQL Server BLOB Data by Using the ADO Stream Object ... >> update using the pointer value as a value in the WHERE clause? ...
    (microsoft.public.sqlserver.programming)
  • Re: main function address
    ... the printffunction documentation in ... The fprintf() documentation in 7.19.6.1 says ... The value of the pointer is ... does the implicit conversion apply when the pointer value is extracted ...
    (comp.lang.c)
  • dynamic_cast does not work as specified
    ... Here's a problem I hit that is inconsistent with the documentation. ... where the CObject* can be one of several types ... I have no idea why this is an invalid expression for dynamic_cast. ... a "pointer to void". ...
    (microsoft.public.vc.mfc)
  • Re: Documentation on implementing a Windows Scripting Engine
    ... that documentation certainly qualifies as private. ... can get access to it if you start working for Microsoft. ... Otherswise a scripting engine is simply a language interpreter. ... Does anyone have a pointer as to a good source of documentation on this ...
    (microsoft.public.win32.programmer.ole)
  • Correct way of changing MFC application name (m_pszAppName)
    ... the MSDN documentation regarding how to change ... the module state struct holds a copy of the m_pszAppName pointer. ... AfxGetAppName() function returns AfxGetModuleState->m_lpszCurrentAppName. ...
    (microsoft.public.vc.mfc)