<?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>Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx</link><description>Over the time I have had this blog, I have often had occasion to say nice things about work that the Shell team does. One of the main reasons for this is a particular characteristic that its members tend to have, one where if there is not an easy way</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1276542</link><pubDate>Wed, 13 Dec 2006 20:36:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1276542</guid><dc:creator>Erzengel</dc:creator><description>&lt;p&gt;I'm curious, why can't they just make the Windows API not assume the length of the (w)char buffer? Doesn't the string have to be null terminated anyway? What am I missing here that makes MAX_PATH remain?&lt;/p&gt;</description></item><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1278219</link><pubDate>Thu, 14 Dec 2006 01:29:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1278219</guid><dc:creator>Michael S. Kaplan</dc:creator><description>&lt;p&gt;There are many applications (both from MS and from third parties) that can and in some cases will break if the limit were arbitrarily raised, duet o the longstanding asumption. It is not simply updating a constant; it is updating a piece of the industry....&lt;/p&gt;
</description></item><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1278910</link><pubDate>Thu, 14 Dec 2006 03:29:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1278910</guid><dc:creator>Erzengel</dc:creator><description>&lt;p&gt;Sorry I wasn't clear, I understand why giving a filename to an application, like via WIN32_FIND_DATA, would need to still be MAX_PATH (unless you go through all the fuss of making a new structure and function calls for &amp;quot;long&amp;quot; filenames--is this what FINDEX_INFO_LEVELS is supposed to be for? (I only show one possible value)).&lt;/p&gt;
&lt;p&gt;I was talking about when you pass a string to windows. The Docs for CreateFile, for example, state that the A version can have no more than MAX_PATH, and the W version can have up to 37 thousand if it starts with &amp;quot;\\?\&amp;quot;. Why does the API care?&lt;/p&gt;</description></item><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1280131</link><pubDate>Thu, 14 Dec 2006 05:19:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1280131</guid><dc:creator>Michael S. Kaplan</dc:creator><description>&lt;p&gt;Well, in the case of CreateFileA, there is a static buffer of the size in question -- thus a MAX_PATH limitation. This is a common pattern in many functions in the Win32 API.&lt;/p&gt;
</description></item><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1281657</link><pubDate>Thu, 14 Dec 2006 09:13:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1281657</guid><dc:creator>Erzengel</dc:creator><description>&lt;p&gt;Then the question I have is: Why can't they make it dynamic? How would this impact applications? Isn't the static buffer on the DLL side, where it theoretically should be inaccessible by applications? Is it just because the A version is no longer &amp;quot;supported&amp;quot;?&lt;/p&gt;</description></item><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1282303</link><pubDate>Thu, 14 Dec 2006 10:47:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1282303</guid><dc:creator>Michael S. Kaplan</dc:creator><description>&lt;p&gt;It is because we are talking about thousands of functions and an implied chain of behavior stretching over a decade, behavior that there is a dependency on.&lt;/p&gt;
&lt;p&gt;And external code often has the same kind of dependency created as well.&lt;/p&gt;
&lt;p&gt;Now this is just the tip of the iceberg, but there is no way that is has ever been considered to be a simple issue -- a global change along the lines you are thinking of here would take man years of effort and would essentially break a ton of applications and code, not to mention leading to countless security holes with people overrunning buffers that are suddenly made too small in every shipping version of Windows....&lt;/p&gt;
</description></item><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1283348</link><pubDate>Thu, 14 Dec 2006 15:05:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1283348</guid><dc:creator>Q</dc:creator><description>&lt;p&gt;Why 260? What a strange constant... You'd think 256 or 255 or 256+3=259 (&amp;quot;C:\&amp;quot;) or something like that would make more sense.&lt;/p&gt;</description></item><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1283537</link><pubDate>Thu, 14 Dec 2006 15:41:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1283537</guid><dc:creator>Michael S. Kaplan</dc:creator><description>&lt;p&gt;You have to leave one for the NULL maybe? :-)&lt;/p&gt;
&lt;p&gt;No idea why they chose 260, actually....&lt;/p&gt;
</description></item><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1286372</link><pubDate>Thu, 14 Dec 2006 18:50:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1286372</guid><dc:creator>Mike Dimmick</dc:creator><description>&lt;p&gt;I'm fairly sure there's a part of MSDN Library which mentions that it's 3 for the drive specification (e.g. &amp;quot;C:\&amp;quot;), 256 for the path, and 1 for the terminating NULL = 260 total.&lt;/p&gt;
&lt;p&gt;A slight difference with the \\?\ syntax is that these can only be absolute paths, not relative ones. Regular paths (not starting with \\?\) are relative on desktop Windows; coming from Windows CE I'm used to a lack of support for relative paths (all paths are absolute on CE, so if you say CreateFile( L&amp;quot;Blah.txt&amp;quot; ) your file ends up in the root - there is no SetCurrentDirectory API).&lt;/p&gt;
&lt;p&gt;Really \\?\ is just an escape to the Win32 API to tell it to pass the path unchanged to the underlying NT native API (e.g. NtCreateFile), rather than prepend the supplied path with the current directory (the native API only works with absolute paths, the current directory is a Win32 concept).&lt;/p&gt;
&lt;p&gt;Clearly the absolute path to a file can already exceed MAX_PATH characters, because of these two features (you can pass a MAX_PATH relative filename to CreateFile when the current directory is not a root path). The question is how to work around the problem. It was done in the move from Win16 to Win32, but of course people had to recompile their programs for that, and the backcompat scheme of generating the 8.3 name was retained.&lt;/p&gt;
</description></item><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1289947</link><pubDate>Fri, 15 Dec 2006 04:16:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1289947</guid><dc:creator>Rosyna</dc:creator><description>&lt;p&gt;i've probably said this so many times that it's becoming old. Paths are evil and should be banished by law. If there were no paths, imagine how much simpler everything would be.&lt;/p&gt;
</description></item><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1290135</link><pubDate>Fri, 15 Dec 2006 04:41:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1290135</guid><dc:creator>Michael S. Kaplan</dc:creator><description>&lt;p&gt;Hmmm.... a little late for that? :-)&lt;/p&gt;
</description></item><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1395817</link><pubDate>Tue, 02 Jan 2007 05:07:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1395817</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;I say break all those apps (how do we know it'll break a lot of apps, isn't that an assumption in itself?). Seriously. I'm so tired of this limitation, it's breaking stuff RIGHT NOW. It's really inexcusable. Plenty of other OSes do not have problems with this. Make a break for it!&lt;/p&gt;
&lt;p&gt;Or at the very least introduce an undocumented option for experts!&lt;/p&gt;
&lt;p&gt;Will we be sitting here in 5 years' time still agonizing about the 260 char path limit? 10 years? 20 years?&lt;/p&gt;
&lt;p&gt;Gah.&lt;/p&gt;</description></item><item><title>re: Sometimes what a person really wants is a LACK of size</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1396178</link><pubDate>Tue, 02 Jan 2007 05:22:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1396178</guid><dc:creator>Michael S. Kaplan</dc:creator><description>&lt;p&gt;Microsoft has AppCompat labs containing many thousands of apps written by Microsoft and other companies, so we do not ever have to guess that things might break in situation -- we know when they might do so.&lt;/p&gt;
&lt;p&gt;If a new version &amp;quot;fixed&amp;quot; the limitation and those apps would fail or introduce security holes by overrunning buffers, it is pretty certain that Microsoft would be blamed for boith the breaks and the security holes. &lt;/p&gt;
&lt;p&gt;Working and safe is a more palatable option for all concerned....&lt;/p&gt;
</description></item><item><title>Windows Vista junctions points, MUI and localized folder names</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1659312</link><pubDate>Mon, 12 Feb 2007 13:33:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1659312</guid><dc:creator>Carlos Quintero's blog</dc:creator><description>&lt;p&gt;I spent quite a few hours yesterday dealing with an intriguing thing that hapenned two days ago while&lt;/p&gt;
</description></item><item><title>Long Paths in .NET, Part 1 of 3 [Kim Hamilton]</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1669924</link><pubDate>Tue, 13 Feb 2007 19:12:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1669924</guid><dc:creator>BCL Team Blog</dc:creator><description>&lt;p&gt;Let’s start by looking at one of the more interesting exception messages in the BCL, the PathTooLongException:&lt;/p&gt;
</description></item><item><title>An opportunity to start down the right [long ]path</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#1671524</link><pubDate>Wed, 14 Feb 2007 00:59:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1671524</guid><dc:creator>Sorting It All Out</dc:creator><description>&lt;p&gt;I have posted previously in entries like Sometimes what a person really wants is a LACK of size about&lt;/p&gt;
</description></item><item><title>Long Paths in .NET, Part 1 of 3 [Kim Hamilton][译]</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#2281810</link><pubDate>Thu, 26 Apr 2007 08:54:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2281810</guid><dc:creator>Tom's Notepad</dc:creator><description>&lt;p&gt;让我们从BCL中的一个有趣的异常开始今天的话题:&lt;/p&gt;</description></item><item><title>Ask a simple question, and then duck!</title><link>http://blogs.msdn.com/michkap/archive/2006/12/13/1275292.aspx#8561305</link><pubDate>Fri, 30 May 2008 05:54:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8561305</guid><dc:creator>Sorting it all Out</dc:creator><description>&lt;p&gt;The whole thread started innocently enough, with a simple question: Check out this shell command I typed&lt;/p&gt;
</description></item></channel></rss>