<?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>Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx</link><description>It goes back to CP/M.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8702403</link><pubDate>Mon, 07 Jul 2008 19:03:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8702403</guid><dc:creator>BryanK</dc:creator><description>&lt;p&gt;And in case anyone's wondering where LOADPARMS32 is documented:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/ms684183"&gt;http://msdn.microsoft.com/en-us/library/ms684183&lt;/a&gt;(VS.85).aspx&lt;/p&gt;
&lt;p&gt;It's part of the LoadModule function docs; it does not have its own doc page, like most of the other Win32 structures do. &amp;nbsp;(Probably because it isn't a Win32 structure, really. &amp;nbsp;It's a Win16 structure included for source compatibility.)&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8702593</link><pubDate>Mon, 07 Jul 2008 19:34:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8702593</guid><dc:creator>Krai Gahwunao</dc:creator><description>&lt;p&gt;So let me get this straight: Technically speaking, there's code in Windows Vista that dates back all the way to CP/M. Nice. (Ok, it's &amp;quot;just&amp;quot; a struct, but it's still pretty ancient.)&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8702997</link><pubDate>Mon, 07 Jul 2008 20:29:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8702997</guid><dc:creator>Tim Smith</dc:creator><description>&lt;p&gt;I would bet there is code in almost any system that dates back +20 years. &amp;nbsp;Why rewrite something just because it is old.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8703589</link><pubDate>Mon, 07 Jul 2008 21:54:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8703589</guid><dc:creator>Daniel Colascione</dc:creator><description>&lt;p&gt;Because it needs to use $LATEST_PROGRAMMING_FAD, of course!&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8704348</link><pubDate>Tue, 08 Jul 2008 00:43:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8704348</guid><dc:creator>Yuhong Bao</dc:creator><description>&lt;p&gt;Another change for Windows was that once you return from the Int 21/AH=4B, the AX register contain the HINSTANCE of the application.&lt;/p&gt;
&lt;p&gt;LoadModule was not documented until Windows 3.0, though LoadModule existed in the header files since at least 2.x. Even after WinExec and LoadModule was added, Int 21/AH=4C had to still be used to terminate an app.&lt;/p&gt;
&lt;p&gt;And how did you get the return code of a spawned app? You had to use TOOLHELP (which was introduced in Windows 3.1) to watch for program termination.&lt;/p&gt;
&lt;p&gt;Int 21 later became DOS3Call in around Windows 3.0 to reduce call overhead in protected mode.&lt;/p&gt;
&lt;p&gt;LoadModule could not load a Win32s application because Win32s used a hook into the Windows 3.1 loader that was not invoked if you called LoadModule.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8705240</link><pubDate>Tue, 08 Jul 2008 03:28:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8705240</guid><dc:creator>Antonio Rodrí­guez</dc:creator><description>&lt;p&gt;When I saw the topic of this post, I was hoping to see some Windows Vista bashing in the comments... and you haven't deceived me ;-) . Windows has code dating from the early 80s for compatibility, true. But both Linux and Mac OS are Unixes, and thus should have code from the early 70s, ten years older than the first version of MS-DOS. Are they worse OSes because of that? No, they aren't. But still, it is quite fun to attack Vista at any chance, isn't it?&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8705249</link><pubDate>Tue, 08 Jul 2008 03:30:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8705249</guid><dc:creator>Daniel Colascione</dc:creator><description>&lt;p&gt;&amp;lt;nit&amp;gt;&lt;/p&gt;
&lt;p&gt;Linux was actually written from the ground up. It contains no Unix code (aside from xfs, these days), and so is technically a Unix-like operating system.&lt;/p&gt;
&lt;p&gt;But close enough for practical purposes, sure.&lt;/p&gt;
&lt;p&gt;&amp;lt;/nit&amp;gt;&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8705844</link><pubDate>Tue, 08 Jul 2008 05:36:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8705844</guid><dc:creator>Joel</dc:creator><description>&lt;p&gt;I'm a Linux user (Mac user at work), and not too fond of Vista, but I do also hate the Vista bashing that goes on in internet forums and blogs. &amp;nbsp;If there are problems with Vista, it's not the fact that LOADPARM32 has double terminated null strings. &amp;nbsp;For every weird API &amp;quot;feature&amp;quot; in Win32, I can find one or more in the Linux world, some of them introduced even later than the wacko Win32 ones, and with worse rationale. &amp;nbsp;And let's not even talk about the pile of crap that is X11...&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8705936</link><pubDate>Tue, 08 Jul 2008 05:55:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8705936</guid><dc:creator>James Day</dc:creator><description>&lt;p&gt;Antonio, you're too sensitive this time. It's interesting to know how old bits are and that's not necessarily an attack.&lt;/p&gt;
&lt;p&gt;It prompted me to check the oldest executable of of a program I wrote that I still use reasonably regularly. That's from July 1997 and is a console application using the 1992-copyrighted version of the Microsoft libraries. Fifteen years of backwards compatibility is quite respectable.&lt;/p&gt;
&lt;p&gt;One less regularly used (last in October 2007) has a copyright date of 1988 and is written in Borland Turbo Pascal. Nineteen years of backwards compatibility is getting to be pretty good.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8706017</link><pubDate>Tue, 08 Jul 2008 06:11:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8706017</guid><dc:creator>ATZ Man</dc:creator><description>&lt;p&gt;The &amp;quot;GNU/&amp;quot; part of GNU/Linux is older than Linux. The nit to be picked here (I know enough to know its there but not enough to actually pick it) lies in the difference between an Operating System and a kernel.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8706036</link><pubDate>Tue, 08 Jul 2008 06:18:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8706036</guid><dc:creator>hexatron</dc:creator><description>&lt;p&gt;Gulp. I still sometimes use WinExec. But not shamelessly.&lt;/p&gt;
&lt;p&gt;Well, hell. If it does what you want...&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8706110</link><pubDate>Tue, 08 Jul 2008 06:41:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8706110</guid><dc:creator>Yuhong Bao</dc:creator><description>&lt;p&gt;&amp;quot;If you want people to switch to your new platform, you need to make it easy, and &amp;quot;you don't have to change anything; it all just works&amp;quot; is pretty easy.&amp;quot;&lt;/p&gt;
&lt;p&gt;Some DOS functions do require minor changes to ensure code using them are compatible with Windows, for example the interrupt handler code and any data it touches had to be marked as FIXED, which in Windows 3.1 requires it to be placed in a DLL because older linkers default any additional data segments as FIXED because real-mode Windows was not able to fix reference to them when these segments move, and 386 enhanced mode Windows not only fixes but even pagelocks FIXED segments. Even in protected-mode Windows, EXEs that define additional data segments are limited to a single instance for a similar reason.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8706642</link><pubDate>Tue, 08 Jul 2008 08:33:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8706642</guid><dc:creator>Worf</dc:creator><description>&lt;p&gt;Honestly, the oldest code in Linux proper would date to around 1991, when Linux 0.1 was released. The oldest code in a full GNU/Linux system would probably date to the 60s or 70s, as the beginnings of Emacs. Most Linux systems don't have a version of vi derived from Bill Joy's code, instead using nvi (a free clone), or more commonly, vim.&lt;/p&gt;
&lt;p&gt;OTOH, since this structure is more of an interface than code itself... this would date Linux' (and BSD and MacOS X...) interface to the 70's as well. After all, the syscalls haven't changed too much over the years.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8707388</link><pubDate>Tue, 08 Jul 2008 11:49:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8707388</guid><dc:creator>Neil</dc:creator><description>&lt;p&gt;386 enhanced mode pagelocks fixed segments because software written for older versions of Windows wouldn't have known about pagelocking.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8707901</link><pubDate>Tue, 08 Jul 2008 14:32:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8707901</guid><dc:creator>SuperKoko</dc:creator><description>&lt;p&gt;From Daniel Colascione:&lt;/p&gt;
&lt;p&gt;&amp;quot;Linux was actually written from the ground up. It contains no Unix code (aside from xfs, these days), and so is technically a Unix-like operating system.&amp;quot;&lt;/p&gt;
&lt;p&gt;MS-DOS and Windows have no CP/M code either, they just have a little bit of CP/M-like interface.&lt;/p&gt;
&lt;p&gt;Further, I think that there's very small to no MS-DOS code in Windows NT/2000/XP/Vista.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8709137</link><pubDate>Tue, 08 Jul 2008 20:40:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8709137</guid><dc:creator>Ray</dc:creator><description>&lt;p&gt;backwards compatibility is a real double edged sword isn't it.&lt;/p&gt;
&lt;p&gt;If you keep doing it, you end up with hacks on top of kludges on top of workarounds and the code continues to bloat.&lt;/p&gt;
&lt;p&gt;But if you lose backwards compatibility, you end up being crucified in the press and people won't buy your product because Lotus 1.0 doesn't work anymore, or being crucified in the sales department because a lot of apps don't work anymore.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8709384</link><pubDate>Tue, 08 Jul 2008 21:52:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8709384</guid><dc:creator>steveshe</dc:creator><description>&lt;p&gt;I hereby submit Yuhong Bao for the BDIU award! Raymond, he doesn't just pollute your blog, he is doign this crap on every technical blog our there. &lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8709488</link><pubDate>Tue, 08 Jul 2008 22:31:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8709488</guid><dc:creator>Jan Ouen</dc:creator><description>&lt;p&gt;@Steveshe: Bao wrote some very interesting comments here, so I don't see your problem.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8709544</link><pubDate>Tue, 08 Jul 2008 22:54:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8709544</guid><dc:creator>mjb</dc:creator><description>&lt;p&gt;&amp;quot;Linux was actually written from the ground up. It contains no Unix code (aside from xfs, these days), and so is technically a Unix-like operating system.&amp;quot;&lt;/p&gt;
&lt;p&gt;Come now. Are you saying no code has been donated to the kernel which originally was from other sources. (appropriately licensed to GPL2 at that point) That seems unlikely to me.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8709831</link><pubDate>Wed, 09 Jul 2008 00:15:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8709831</guid><dc:creator>Ulric</dc:creator><description>&lt;p&gt;I'm not really at ease with these articles.&lt;/p&gt;
&lt;p&gt;All they seem to do is get people worked up about APIs and structures in Windows that are obsolete, perpetuating the myth that Windows is old and trapped in backward compatibility. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is doing to harm to Microsoft. &amp;nbsp;it'll just end up as fodder on sites that are campaigning against Vista. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can't see any positive aspect to these articles. &amp;nbsp;It's dead code, just leave it alone. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Right now Microsoft is in a critically wounded state with Vista, and us third party developers are struggling with clients who want away from Windows because of Vista. Information about CP/M structure in Vista is not helping anyone, it's information that is useless for everyone except the competition.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8710021</link><pubDate>Wed, 09 Jul 2008 01:10:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8710021</guid><dc:creator>Timothy Fries</dc:creator><description>&lt;p&gt;&amp;gt; it'll just end up as fodder on sites that are campaigning against Vista.&lt;/p&gt;
&lt;p&gt;Those sites that have such an obvious axe to grind against Microsoft that they'd use something as benign as a legacy API as a hammer are going to find things to complain about anyway. &amp;nbsp;Most of the complaints about Vista on the net are based solely in fiction as it is (such as the statement that Microsoft is &amp;quot;in a critically wounded state with Vista&amp;quot;).&lt;/p&gt;
&lt;p&gt;Raymond's blog is a fantastic source of, if nothing else, trivia about why these old APIs are the way they are; and it's a shame that you're suggesting such a useful and interesting resource stop being so because people who hate Microsoft with every breath might find ammunition here.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8710034</link><pubDate>Wed, 09 Jul 2008 01:12:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8710034</guid><dc:creator>SuperKoko</dc:creator><description>&lt;p&gt;From Ray:&lt;/p&gt;
&lt;p&gt;&amp;quot;If you keep doing it, you end up with hacks on top of kludges on top of workarounds and the code continues to bloat.&amp;quot;&lt;/p&gt;
&lt;p&gt;There're no hack or workaround to make LoadModule work in Windows Vista. It's a trivial thunk to CreateProcess that most programmers safely ignore. It simply doesn't harm (unlike some backward-compatibility hacks described in other blogs entries).&lt;/p&gt;
&lt;p&gt;From Ulric:&lt;/p&gt;
&lt;p&gt;&amp;quot;I can't see any positive aspect to these articles.&amp;quot;&lt;/p&gt;
&lt;p&gt;So, don't read them and don't flood the comment system.&lt;/p&gt;
&lt;p&gt;Read the title of the blog before starting reading entries.&lt;/p&gt;
&lt;p&gt;The OLD new thing.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8710039</link><pubDate>Wed, 09 Jul 2008 01:13:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8710039</guid><dc:creator>James Day</dc:creator><description>&lt;p&gt;Ulric, so help your clients do what they believe is best for their business. If that's not Windows for some clients, then you should be considering whether and how to service the various markets that make sense.&lt;/p&gt;
&lt;p&gt;Meanwhile Raymond is effectively explaining that if they buy a Windows-based application, Microsoft is going to try to make sure that their large investment isn't made obsolete in only a couple of years. And that is of considerable value.&lt;/p&gt;
&lt;p&gt;Unless your product is tied to Vista or Windows and can't possibly work on other systems, stop blaming Raymond and go out and service the markets your customers want you to service. Or let the competition do it, if you're really determined not to adapt.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8710701</link><pubDate>Wed, 09 Jul 2008 04:18:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8710701</guid><dc:creator>Yuhong Bao</dc:creator><description>&lt;p&gt;BTW, back in 1975, C did not exist on anything other than UNIX.&lt;/p&gt;
&lt;p&gt;In contrast, by 1983, C compilers are beginning to appear for MS-DOS, and even MS had it's own version of Unix called Xenix.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8712760</link><pubDate>Wed, 09 Jul 2008 19:04:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8712760</guid><dc:creator>John Topley</dc:creator><description>&lt;p&gt;&amp;quot;Further, I think that there's very small to no MS-DOS code in Windows NT/2000/XP/Vista.&amp;quot;&lt;/p&gt;
&lt;p&gt;I don't think that's quite true. IIRC, ntvdm.exe is based on the MS-DOS 5.0 source code. If you were going to provide an environment for running old MS-DOS programs then it would make sense to use at least some of the original code from the original operating system itself. It is probably a small percentage of the overall Windows Vista code base though.&lt;/p&gt;
</description></item><item><title>re: Why is the LOADPARMS32 structure so messed up?</title><link>http://blogs.msdn.com/oldnewthing/archive/2008/07/07/8699128.aspx#8722672</link><pubDate>Sat, 12 Jul 2008 08:53:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8722672</guid><dc:creator>Yuhong Bao</dc:creator><description>&lt;p&gt;In fact, I don't think even the changes to Int 21/4B was documented until Windows 3.0. A MS employee posted back in the 2.x days in a newsgroup sample code for spawning a Windows app. Google in Groups &amp;quot;Spawning Windows Applications&amp;quot; to take a look at this code.&lt;/p&gt;
</description></item></channel></rss>