Boost C++ Libraries: Ticket #856: iostreams file_descriptor::write fails under Win32 https://svn.boost.org/trac10/ticket/856 <pre class="wiki">in 1.33.1, file_descriptor::write(), append mode implemented as #ifdef BOOST_IOSTREAMS_WINDOWS if (pimpl_-&gt;flags_ &amp; impl::has_handle) { if (pimpl_-&gt;flags_ &amp; impl::append) { ::SetFilePointer(pimpl_-&gt;handle_, 0, NULL, FILE_END); if (::GetLastError() != NO_ERROR) throw detail::bad_seek(); it is common mistake to call GetLastError() without checking function return value first. MSDN has special note for SetFilePointer(): "Note If the function returns a value other than INVALID_SET_FILE_POINTER, the call to SetFilePointer has succeeded. You do not need to call GetLastError." So, file_descriptor::write() fails, if there is old uncleaned "last" error Regards, valeri.antonov@gmail.com </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/856 Trac 1.4.3 gmsb Fri, 16 Mar 2007 16:23:03 GMT <link>https://svn.boost.org/trac10/ticket/856#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/856#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=271167 Originator: NO This is the same issue as in the comment on patches #1452698. How can we speed up when this and other Boost.Iostreams patches are applied? </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Daryle Walker</dc:creator> <pubDate>Fri, 03 Aug 2007 12:25:30 GMT</pubDate> <title>component changed; severity set https://svn.boost.org/trac10/ticket/856#comment:2 https://svn.boost.org/trac10/ticket/856#comment:2 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">iostreams</span> </li> <li><strong>severity</strong> → <span class="trac-field-new">Problem</span> </li> </ul> Ticket Frank Birbacher Fri, 24 Aug 2007 01:40:43 GMT <link>https://svn.boost.org/trac10/ticket/856#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/856#comment:3</guid> <description> <p> Bug noted and addressed in <a class="changeset" href="https://svn.boost.org/trac10/changeset/38879" title="Changed error checking on Windows API function. Adresses #856">[38879]</a>. Still needs approval of maintainer. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 02 Oct 2007 21:37:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/856#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/856#comment:4</guid> <description> <p> Is this a duplicate of ticket <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/699" title="#699: Bugs: Changing size of memory-mapped file on Windows (closed: fixed)">#699</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jonathan Turkanis</dc:creator> <pubDate>Sat, 29 Dec 2007 20:04:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/856#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/856#comment:5</guid> <description> <p> this is not a duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/699" title="#699: Bugs: Changing size of memory-mapped file on Windows (closed: fixed)">#699</a>; <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/699" title="#699: Bugs: Changing size of memory-mapped file on Windows (closed: fixed)">#699</a> deals with mapped_file, not file_descriptor </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jonathan Turkanis</dc:creator> <pubDate>Sun, 30 Dec 2007 02:16:52 GMT</pubDate> <title>status, resolution changed https://svn.boost.org/trac10/ticket/856#comment:6 https://svn.boost.org/trac10/ticket/856#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in <a class="changeset" href="https://svn.boost.org/trac10/changeset/42266" title="ported changes from branches/iostreams_dev revisions 42144-42265">[42266]</a> </p> Ticket