<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to host an IContextMenu, part 6 - Displaying menu help</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx</link><description>Displaying help text in the status bar.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: How to host an IContextMenu, part 6 - Displaying menu help</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#235252</link><pubDate>Tue, 28 Sep 2004 15:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:235252</guid><dc:creator>Maxime LABELLE</dc:creator><description>Raymond,&lt;br&gt;&lt;br&gt;Your series is absolutely fabulous and very informative. Your writing skills make it look like all you're describing is easy, as in fact we  know it's not that simple.&lt;br&gt;&lt;br&gt;The thing is, this article is probably the first one that practically illustrates what can be thought of as your trademark ; namely the use of helper functions to circumvent bugs in other products.&lt;br&gt;&lt;br&gt;Very informative, indeed.&lt;br&gt;Cheers.&lt;br&gt;</description></item><item><title>re: How to host an IContextMenu, part 6 - Displaying menu help</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#235263</link><pubDate>Tue, 28 Sep 2004 16:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:235263</guid><dc:creator>Jerry Pisk</dc:creator><description>I'm just wondering - if you go to such lengths supporting third party applications that ignore the API rules, how do you expect your developers to actually follow them? It's like teaching kids - if you keep excusing every time they screw up they won't learn anything.</description></item><item><title>re: How to host an IContextMenu, part 6 - Displaying menu help</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#235268</link><pubDate>Tue, 28 Sep 2004 16:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:235268</guid><dc:creator>Raymond Chen</dc:creator><description>Would you rather have a buffer overflow inside Explorer that an attacker can exploit?</description></item><item><title>re: How to host an IContextMenu, part 6 - Displaying menu help</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#235274</link><pubDate>Tue, 28 Sep 2004 16:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:235274</guid><dc:creator>mschaef</dc:creator><description>&amp;quot;The shell has lots of strange functions like this. &amp;quot;&lt;br&gt;&lt;br&gt;This may sound odd, but is there a way to turn off all of the application compatibility special case code during development? I'd rather not inadvertantly be depending on something that was put in for backwards compatibility.</description></item><item><title>re: How to host an IContextMenu, part 6 - Displaying menu help</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#235303</link><pubDate>Tue, 28 Sep 2004 17:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:235303</guid><dc:creator>Tony Cox [MS]</dc:creator><description>You can use the AppVerifier (&lt;a target="_new" href="http://www.microsoft.com/technet/prodtechnol/winxppro/deploy/appvrfr.mspx"&gt;http://www.microsoft.com/technet/prodtechnol/winxppro/deploy/appvrfr.mspx&lt;/a&gt;) to help you identify some problems.</description></item><item><title>re: How to host an IContextMenu, part 6 - Displaying menu help</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#235322</link><pubDate>Tue, 28 Sep 2004 17:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:235322</guid><dc:creator>Jerry Pisk</dc:creator><description>I still have a buffer overflow in Explorer that an attacker can exploit, all he/she needs to is overflow by more than one character. By implementing this &amp;quot;fix&amp;quot; you've just hidden the problem from all developers, including those that would fix their code if they knew it wasn't working.</description></item><item><title>re: How to host an IContextMenu, part 6 - Displaying menu help</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#235326</link><pubDate>Tue, 28 Sep 2004 17:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:235326</guid><dc:creator>Michael</dc:creator><description>Jerry - Raymond is implying that there are a lot of legacy context menu handlers that overflow by one character.  If an attacker can get explorer to load his context menu handler, he is not going to try to overrun the buffer.  He has code running on the box, and your machine is suddenly sending spam and your documents are being uploaded to an FTP server in the other hemisphere.</description></item><item><title>re: How to host an IContextMenu, part 6 - Displaying menu help</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#235427</link><pubDate>Tue, 28 Sep 2004 21:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:235427</guid><dc:creator>Andy</dc:creator><description>I've been &amp;quot;playing along at home&amp;quot;, and modifying the scratch program with the code that you post each day. I think there might be a problem with today's code, though - where is g_pcm defined? I assume that's defined similar to how g_pcm2 and g_pcm3 were defined yesterday, and modified OnContextMenu() to use the global instead of the local. That seems to work - is that what you intended?</description></item><item><title>re: How to host an IContextMenu, part 6 - Displaying menu help</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#235464</link><pubDate>Tue, 28 Sep 2004 22:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:235464</guid><dc:creator>James</dc:creator><description>Using security as the example was a bad idea, but separately it seems to me that there are only three options:&lt;br&gt;1) Pass in an exact-length buffer and never do otherwise... after all, programmers should write bug-free software! Break ImportantBusinessApp v0.9 in the next upgrade.&lt;br&gt;2) Pass in an exact-length buffer and then test and fix it in the next release, when suddenly it matters due to other changes in the caller.&lt;br&gt;3) Pass in a larger buffer to start with. Sometimes, life's a bore.&lt;br&gt;&lt;br&gt;I guess there's also option four: pass in a larger buffer to start with, attempt to check for the mistake, and do something obvious to coax the programmer into fixing his code. I'm not sure how well this works when the shell is acting as a client to a COM component, and control has left the COM component before the problem can be detected.</description></item><item><title>re: How to host an IContextMenu, part 6 - Displaying menu help</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#235480</link><pubDate>Tue, 28 Sep 2004 23:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:235480</guid><dc:creator>tom</dc:creator><description>Raymond, did you mean to compare the pszAnsi using L?</description></item><item><title>re: How to host an IContextMenu, part 6 - Displaying menu help</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#235652</link><pubDate>Wed, 29 Sep 2004 10:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:235652</guid><dc:creator>Ben Hutchings</dc:creator><description>SQL Server has a bunch of bugs in its ODBC driver where it interprets a length that the ODBC documentation says is a number of bytes as a number of characters. This doesn't work very well when you call the Unicode versions of the affected functions - it results in spectacular buffer overflows. So instead of allocating a double-length buffer in Unicode builds I have to allocate a quadruple-length buffer and say it's only double-length. I can pass on the details if it'll help.&lt;br&gt;&lt;br&gt;Also MLang's Conversion class has some small buffer overflow bugs.&lt;br&gt;&lt;br&gt;I can pass details to anyone at Microsoft who can actually do something about these rather than telling me the workarounds I already figured out.</description></item><item><title>Shell Extensibility in Longhorn</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#241705</link><pubDate>Wed, 13 Oct 2004 16:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:241705</guid><dc:creator>notgartner.com: Mitch Denny's Blog</dc:creator><description /></item><item><title>IContextMenu のホスト方法 - Shell</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#558163</link><pubDate>Wed, 22 Mar 2006 20:33:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:558163</guid><dc:creator>社本＠ワック Blog</dc:creator><description>IContextMenu のホスト方法 - Shell</description></item><item><title>The forgotten common controls: The MenuHelp function</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/09/28/235242.aspx#622199</link><pubDate>Thu, 08 Jun 2006 17:00:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:622199</guid><dc:creator>The Old New Thing</dc:creator><description>It doesn't really help much.</description></item></channel></rss>