<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">The Old New Thing</title><subtitle type="html">not actually to establish a blogging point where individuals can enrich their learns on facilitating and leveraging .NET-related activities most effectively</subtitle><id>http://blogs.msdn.com/b/oldnewthing/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/oldnewthing/atom.aspx" /><generator uri="http://telligent.com" version="5.6.583.21163">Telligent Community 5.6.583.21163 (Build: 5.6.583.21163)</generator><updated>2012-01-12T07:00:01Z</updated><entry><title>Fancy use of exception handling in FormatMessage leads to repeated "discovery" of security flaw</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/02/10/10266256.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/02/10/10266256.aspx</id><published>2012-02-10T15:00:00Z</published><updated>2012-02-10T15:00:00Z</updated><content type="html">&lt;P&gt;
Every so often, somebody "discovers" an alleged
security vulnerability in the &lt;CODE&gt;Format&amp;shy;Message&lt;/CODE&gt; function.
You can try it yourself:
&lt;/P&gt;
&lt;PRE&gt;
#include &amp;lt;windows.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;

char buf[2048];
char extralong[128*1024];

int __cdecl main(int argc, char **argv)
{
 memset(extralong, 'x', 128 * 1024 - 1);
 DWORD_PTR args[] = { (DWORD_PTR)extralong };
 FormatMessage(FORMAT_MESSAGE_FROM_STRING |
               FORMAT_MESSAGE_ARGUMENT_ARRAY, "%1", 0, 0,
               buf, 2048, (va_list*)args);
 return 0;
} 
&lt;/PRE&gt;
&lt;P&gt;
If you run this program under the debugger and you tell it to break
on all exceptions,
then you will find that it breaks on an access violation
trying to write to an invalid address.
&lt;/P&gt;
&lt;PRE&gt;
eax=00060078 ebx=fffe0001 ecx=0006fa34 edx=00781000 esi=0006fa08 edi=01004330
eip=77f5b279 esp=0006f5ac ebp=0006fa1c iopl=0         nv up ei pl nz na pe cy
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00010203
ntdll!fputwc+0x14:
77f5b279 668902           mov     [edx],ax              ds:0023:00781000=????
&lt;/PRE&gt;
&lt;P&gt;
Did you just find a buffer overflow security vulnerability?
&lt;/P&gt;
&lt;P&gt;
The &lt;CODE&gt;FormatMessage&lt;/CODE&gt; function was part of the original
Win32 interface,
back in the days when you had lots of address space
(two whole &lt;I&gt;gigabytes&lt;/I&gt;) but not a lot of RAM (12 megabytes,
or 16 if you were running Server).
The implementation of &lt;CODE&gt;FormatMessage&lt;/CODE&gt; reflects
this historical reality by
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2003/10/10/55256.aspx"&gt;
working hard to conserve RAM&lt;/A&gt;
but not worrying too much about conserving address space.
And it takes advantage of this fancy new &lt;I&gt;structured
exception handling&lt;/I&gt; feature.
&lt;/P&gt;
&lt;P&gt;
The &lt;CODE&gt;FormatMessage&lt;/CODE&gt; uses the
&lt;I&gt;reserve a bunch of address space but commit pages only as they
are necessary&lt;/I&gt; pattern, illustrated in MSDN
under the topic
&lt;A HREF="http://msdn.microsoft.com/library/aa366803.aspx"&gt;
Reserving and Committing Memory&lt;/A&gt;.
Except that the sample code on that page contains serious errors.
For example, if the sample code encounters an exception other than
&lt;CODE&gt;STATUS_&lt;WBR&gt;ACCESS_&lt;WBR&gt;VIOLATION&lt;/CODE&gt;, it still "handles"
it by doing nothing and returning
&lt;CODE&gt;EXCEPTION_&lt;WBR&gt;EXECUTE_&lt;WBR&gt;HANDLER&lt;/CODE&gt;.
It fails to handle random access to the buffer
or access violations caused by DEP.
Though in the very specific sample, it mostly works since the
protected region does only one thing, so there aren't many
opportunities for the other types of exceptions to occur.
(Though if you're really unlucky, you might get an
&lt;CODE&gt;STATUS_&lt;WBR&gt;IN_&lt;WBR&gt;PAGE_&lt;WBR&gt;ERROR&lt;/CODE&gt;.)
But enough complaining about that sample.
&lt;/P&gt;
&lt;P&gt;
The &lt;CODE&gt;FormatMessage&lt;/CODE&gt;
function reserves
64&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2009/06/11/9725386.aspx"&gt;KB&lt;/A&gt;
of address space, commits the first page,
and then calls an internal helper function whose job it is
to generate the output,
passing the start of the 64KB block of address space as the
starting address and telling it to give up when it reaches 64KB.
Something like this:
&lt;/P&gt;
&lt;PRE&gt;
struct DEMANDBUFFER
{
  void *Base;
  SIZE_T Length;
};

int
PageFaultExceptionFilter(DEMANDBUFFER *Buffer,
                         EXCEPTION_RECORD ExceptionRecord)
{
  int Result;

  &lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2012/02/09/10265660.aspx"&gt;DWORD dwLastError = GetLastError();&lt;/A&gt;

  // The only exception we handle is a continuable read/write
  // access violation inside our demand-commit buffer.
  if (ExceptionRecord-&amp;gt;ExceptionFlags &amp;amp; EXCEPTION_NONCONTINUABLE)
    Result = EXCEPTION_CONTINUE_SEARCH;

  else if (ExceptionRecord-&amp;gt;ExceptionCode != EXCEPTION_ACCESS_VIOLATION)
    Result = EXCEPTION_CONTINUE_SEARCH;

  else if (ExceptionRecord-&amp;gt;NumberParameters &amp;lt; 2)
    Result = EXCEPTION_CONTINUE_SEARCH;

  else if (ExceptionRecord-&amp;gt;ExceptionInformation[0] &amp;amp;
      ~(EXCEPTION_READ_FAULT | EXCEPTION_WRITE_FAULT))
    Result = EXCEPTION_CONTINUE_SEARCH;

  else if (ExceptionRecord-&amp;gt;ExceptionInformation[1] -
      (ULONG_PTR)Buffer-&amp;gt;Base &amp;gt;= Buffer-&amp;gt;Length)
    Result = EXCEPTION_CONTINUE_SEARCH;

  else {
    // If the memory is already committed, then committing memory won't help!
    // (The problem is something like writing to a read-only page.)
    void *ExceptionAddress = (void*)ExceptionInformation[1];
    MEMORY_BASIC_INFORMATION Information;
    if (VirtualQuery(ExceptionAddress, &amp;amp;Information,
                     sizeof(Information)) != sizeof(Information))
      Result = EXCEPTION_CONTINUE_SEARCH;

    else if (Information.State != MEM_RESERVE)
      Result = EXCEPTION_CONTINUE_SEARCH;

    // Okay, handle the exception by committing the page.
    // Exercise: What happens if the faulting memory access
    // spans two pages?
    else if (!VirtualAlloc(ExceptionAddress, 1, MEM_COMMIT, PAGE_READWRITE))
      Result = EXCEPTION_CONTINUE_SEARCH;

    // We successfully committed the memory - retry the operation
    Result = EXCEPTION_CONTINUE_EXECUTION;
  }

  &lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2011/04/29/10159322.aspx"&gt;RestoreLastError&lt;/A&gt;(dwLastError);
  return Result;
}

DWORD FormatMessage(...)
{
  DWORD Result = 0;
  DWORD Error;
  DEMANDBUFFER Buffer;
  Error = InitializeDemandBuffer(&amp;amp;Buffer, FORMATMESSAGE_MAXIMUM_OUTPUT);
  if (Error == ERROR_SUCCESS) {
    __try {
     Error = FormatMessageIntoBuffer(&amp;amp;Result,
                                     Buffer.Base, Buffer.Length, ...);
    } __except (PageFaultExceptionFilter(&amp;amp;Buffer,
                   GetExceptionInformation()-&amp;gt;ExceptionRecord)) {
     // never reached - we never handle the exception
    }
  }
  if (Error == ERROR_SUCCESS) {
   Error = CopyResultsOutOfBuffer(...);
  }
  DeleteDemandBuffer(&amp;amp;Buffer);
  if (Result == 0) {
    SetLastError(Error);
  }
  return Result;
}
&lt;/PRE&gt;
&lt;P&gt;
The &lt;CODE&gt;FormatMessageIntoBuffer&lt;/CODE&gt; function takes an output
buffer and a buffer size, and it writes the result to the output buffer,
stopping when the buffer is full.
The &lt;CODE&gt;DEMANDBUFFER&lt;/CODE&gt; structure and the
&lt;CODE&gt;PageFaultExceptionHandler&lt;/CODE&gt;
work together to create the output buffer on demand
as the &lt;CODE&gt;FormatMessageIntoBuffer&lt;/CODE&gt; function does its work.
&lt;/P&gt;
&lt;P&gt;
To make discussion easier, let's say that the
&lt;CODE&gt;FormatMessage&lt;/CODE&gt; function merely took printf-style arguments
and supported only
&lt;CODE&gt;FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER&lt;/CODE&gt;.
&lt;/P&gt;
&lt;PRE&gt;
DWORD FormatMessageFromStringPrintfAllocateBuffer(
    PWSTR *ResultBuffer,
    PCWSTR FormatString,
    ...)
{
  DWORD Result = 0;
  DWORD ResultString = NULL;
  DWORD Error;
  DEMANDBUFFER Buffer;
  va_list ap;
  va_start(ap, FormatString);
  Error = InitializeDemandBuffer(&amp;amp;Buffer, FORMATMESSAGE_MAXIMUM_OUTPUT);
  if (Error == ERROR_SUCCESS) {
    __try {
     SIZE_T MaxChars = Buffer.Length / sizeof(WCHAR);
     int i = _vsnwprintf((WCHAR*)Buffer.Base, MaxChars,
                         FormatString, ap);
     if (i &amp;lt; 0 || i &amp;gt;= MaxChars) Error = ERROR_MORE_DATA;
     else Result = i;
    } __except (PageFaultExceptionFilter(&amp;amp;Buffer,
                   GetExceptionInformation()-&amp;gt;ExceptionRecord)) {
     // never reached - we never handle the exception
    }
  }
  if (Error == ERROR_SUCCESS) {
   // Exercise: Why don't we need to worry about integer overflow?
   DWORD BytesNeeded = sizeof(WCHAR) * (Result + 1);
   ResultString = (PWSTR)LocalAlloc(LMEM_FIXED, BytesNeeded);
   if (ResultBuffer) {
    // Exercise: Why CopyMemory and not StringCchCopy?
    CopyMemory(ResultString, Buffer.Base, BytesNeeded);
   } else Error = ERROR_NOT_ENOUGH_MEMORY;
  }
  DeleteDemandBuffer(&amp;amp;Buffer);
  if (Result == 0) {
    SetLastError(Error);
  }
  *ResultBuffer = ResultString;
  va_end(ap);
  return Result;
}
&lt;/PRE&gt;
&lt;P&gt;
Let's run this function in our head to see what happens if
somebody triggers the alleged buffer overflow by calling
&lt;/P&gt;
&lt;PRE&gt;
PWSTR ResultString;
DWORD Result = FormatMessageFromStringPrintfAllocateBuffer(
                   &amp;amp;ResultString, L"%s", VeryLongString);
&lt;/PRE&gt;
&lt;P&gt;
After setting up the demand buffer, we call
&lt;CODE&gt;_vsnwprintf&lt;/CODE&gt;
to format the output into the demand buffer,
but telling it not to go past the buffer's total length.
The &lt;CODE&gt;_vsnwprintf&lt;/CODE&gt; function parses the format
string and sees that it needs to copy &lt;CODE&gt;VeryLongString&lt;/CODE&gt;
to the output buffer.
Let's say that the &lt;CODE&gt;DEMANDBUFFER&lt;/CODE&gt; was allocated at
address &lt;CODE&gt;0x00780000&lt;/CODE&gt; on a system with 4KB pages.
At the start of the copy, the address space looks like this:
&lt;/P&gt;
&lt;TABLE STYLE="border-collapse: collapse; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=16 ALIGN=center STYLE="border-top: solid .75pt black; border-left: solid .75pt black; border-right: solid .75pt black"&gt;64KB&lt;/TD&gt;
    &lt;TD&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;1000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;2000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;3000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;4000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;5000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;6000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;7000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;8000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;9000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;A000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;B000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;C000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;D000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;E000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;F000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0079&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;X&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=16 ALIGN=left&gt;^ output pointer&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
"C" stands for a committed page, "R" stands for a reserved page,
and "X" stands for a page that, if accessed, would be a buffer overflow.
We start copying &lt;CODE&gt;VeryLongString&lt;/CODE&gt; into the output buffer.
After copying 2048 characters, we fill the first committed page;
copying character 2049 raises a page fault exception.
&lt;/P&gt;
&lt;TABLE STYLE="border-collapse: collapse; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=16 ALIGN=center STYLE="border-top: solid .75pt black; border-left: solid .75pt black; border-right: solid .75pt black"&gt;64KB&lt;/TD&gt;
    &lt;TD&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;1000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;2000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;3000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;4000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;5000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;6000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;7000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;8000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;9000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;A000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;B000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;C000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;D000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;E000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;F000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0079&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;X&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD&gt;&lt;/TD&gt;
    &lt;TD COLSPAN=15 ALIGN=left&gt;^ output pointer&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
This is the point at which over-eager people observe the first-chance
exception, capture the register dump above,
and begin writing up their security vulnerability report,
cackling with glee.
(Observe that in the register dump,
the address we are writing to is of the form &lt;CODE&gt;0x####1000&lt;/CODE&gt;.)
&lt;/P&gt;
&lt;P&gt;
As with all first-chance exceptions,
it goes down the exception chain.
Our custom &lt;CODE&gt;PageFaultExceptionFilter&lt;/CODE&gt; recognizes this
as an access violation in a page that it is responsible for,
and the page hasn't yet been committed, so it commits the page as
read/write and resumes execution.
&lt;/P&gt;
&lt;TABLE STYLE="border-collapse: collapse; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=16 ALIGN=center STYLE="border-top: solid .75pt black; border-left: solid .75pt black; border-right: solid .75pt black"&gt;64KB&lt;/TD&gt;
    &lt;TD&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;1000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;2000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;3000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;4000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;5000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;6000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;7000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;8000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;9000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;A000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;B000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;C000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;D000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;E000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;F000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0079&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;X&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD&gt;&lt;/TD&gt;
    &lt;TD COLSPAN=15 ALIGN=left&gt;^ output pointer&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
Copying character 2049 now succeeds, as does the copying of characters
2050 through 4096.
When we hit character 4097, the cycle repeats:
&lt;/P&gt;
&lt;TABLE STYLE="border-collapse: collapse; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=16 ALIGN=center STYLE="border-top: solid .75pt black; border-left: solid .75pt black; border-right: solid .75pt black"&gt;64KB&lt;/TD&gt;
    &lt;TD&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;1000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;2000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;3000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;4000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;5000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;6000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;7000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;8000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;9000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;A000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;B000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;C000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;D000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;E000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;F000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0079&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;X&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=2&gt;&lt;/TD&gt;
    &lt;TD COLSPAN=14 ALIGN=left&gt;^ output pointer&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
Again, the first-chance exception is sent down the chain,
our
&lt;CODE&gt;PageFaultExceptionFilter&lt;/CODE&gt;
recognizes this as a page it is responsible for,
and it commits the page and resumes execution.
&lt;/P&gt;
&lt;TABLE STYLE="border-collapse: collapse; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=16 ALIGN=center STYLE="border-top: solid .75pt black; border-left: solid .75pt black; border-right: solid .75pt black"&gt;64KB&lt;/TD&gt;
    &lt;TD&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;1000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;2000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;3000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;4000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;5000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;6000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;7000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;8000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;9000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;A000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;B000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;C000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;D000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;E000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;F000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;R&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0079&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;X&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=2&gt;&lt;/TD&gt;
    &lt;TD COLSPAN=14 ALIGN=left&gt;^ output pointer&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
If you think about it, this is exactly what the memory manager does
with memory that has been allocated but not yet accessed:
The memory is not present,
and the moment an application tries to access it,
the not-present page fault is raised,
the memory manager commits the page,
and then execution resumes normally.
It's memory-on-demand, which is one of the essential elements of
virtual memory.
What's going on with the &lt;CODE&gt;DEMANDBUFFER&lt;/CODE&gt; is that we are
simulating in user mode what the memory manager does in kernel mode.
(The difference is that while the memory manager takes committed
memory and makes it present on demand,
the &lt;CODE&gt;DEMANDBUFFER&lt;/CODE&gt; takes reserved address space
and commits it on demand.)
&lt;/P&gt;
&lt;P&gt;
The cycle repeats 13 more times, and then we reach another interesting
part of the scenario:
&lt;/P&gt;
&lt;TABLE STYLE="border-collapse: collapse; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=16 ALIGN=center STYLE="border-top: solid .75pt black; border-left: solid .75pt black; border-right: solid .75pt black"&gt;64KB&lt;/TD&gt;
    &lt;TD&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;1000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;2000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;3000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;4000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;5000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;6000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;7000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;8000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;9000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;A000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;B000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;C000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;D000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;E000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;F000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0079&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;X&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=16 ALIGN=right&gt;output pointer ^&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
We are about to write 32768th character into the
&lt;CODE&gt;DEMANDBUFFER&lt;/CODE&gt;.
Once that's done, the buffer will be completely full.
One more byte and we will overflow the buffer.
(Not even a wafer-thin byte will fit.)
&lt;/P&gt;
&lt;P&gt;
Let's write that last character and
&lt;A HREF="http://www.slipups.com/items/698.html"&gt;
cover our ears in anticipation&lt;/A&gt;.
&lt;/P&gt;
&lt;TABLE STYLE="border-collapse: collapse; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=16 ALIGN=center STYLE="border-top: solid .75pt black; border-left: solid .75pt black; border-right: solid .75pt black"&gt;64KB&lt;/TD&gt;
    &lt;TD&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;1000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;2000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;3000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;4000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;5000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;6000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;7000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;8000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;9000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;A000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;B000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;C000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;D000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;E000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#FFFF80 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0078&lt;BR&gt;F000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;C&lt;/TD&gt;
    &lt;TD BGCOLOR=#808080 STYLE="width: 5%; border: .75pt solid black"&gt;&lt;FONT SIZE=-1&gt;&lt;CODE&gt;0079&lt;BR&gt;0000&lt;/CODE&gt;&lt;/FONT&gt;&lt;BR&gt;X&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=16 align=right&gt;output pointer&lt;/TD&gt;
    &lt;TD ALIGN=left&gt;^&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
Oh noes!
Completely full!
Run for cover!
&lt;/P&gt;
&lt;P&gt;
But wait.
We passed a buffer size to the
&lt;CODE&gt;_vsnwprintf&lt;/CODE&gt; function, remember?
We already told it never to write more than 32768 characters.
As it's about to write character 32769, it realizes,
"Wait a second, this would overflow the buffer I was given.
I'll return a failure code instead."
&lt;/P&gt;
&lt;P&gt;
The feared write of the 32769th character never takes place.
We never write to the "X" page.
Instead, the &lt;CODE&gt;_vnswprintf&lt;/CODE&gt; call returns that the
buffer was not large enough, which is converted into
&lt;CODE&gt;ERROR_MORE_DATA&lt;/CODE&gt; and returned to the caller.
&lt;/P&gt;
&lt;P&gt;
If you follow through the entire story, you see that everything
worked as it was supposed to and no overflow took place.
The &lt;CODE&gt;_vnswprintf&lt;/CODE&gt; function ran up to the brink of
disaster but stopped before taking that last step.
This is hardly anything surprising; it happens whenever
the &lt;CODE&gt;_vnswprintf&lt;/CODE&gt; function encounters a buffer
too small to hold the output.
The only difference is that along the way, we saw a few
first-chance exceptions,
exceptions that had nothing to do with avoiding the buffer
overflow in the first place.
They were just part of &lt;CODE&gt;FormatMessage&lt;/CODE&gt;'s
fancy buffer management.
&lt;/P&gt;
&lt;P&gt;
It so happens that in Windows Vista,
the fancy buffer management technique was abandoned, and
the code just allocates 64KB of memory up front and doesn't
try any fancy commit-on-demand games.
Computer memory has become plentiful enough that a momentary allocation
of 64KB has less of an impact than it did twenty years ago,
and performance measurements showed that the new
"Stop trying to be so clever" technique was now about 80 times
faster than the "gotta scrimp and save every last byte of memory"
technique.
&lt;/P&gt;
&lt;P&gt;
The change had more than just a performance effect.
It also removed the first-chance exception from &lt;CODE&gt;FormatMessage&lt;/CODE&gt;,
which means that it no longer does that thing which everybody
mistakes for a security vulnerability.
The good news is that nobody reports this as a vulnerability
in Windows&amp;nbsp;Vista any more.
The bad news is that people still report it as a vulnerability
in Windows&amp;nbsp;XP,
and each
time this issue comes up,
somebody (possibly me) has to sit down and
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2007/12/18/6793468.aspx"&gt;
reverify that the previous analysis is still correct&lt;/A&gt;,
in the specific scenario being reported,
because who knows, maybe this time they really did find a problem.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10266256" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Code" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Code/" /></entry><entry><title>What is the effect of memory-mapped file access on GetLastError()?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/02/09/10265660.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/02/09/10265660.aspx</id><published>2012-02-09T15:00:00Z</published><updated>2012-02-09T15:00:00Z</updated><content type="html">&lt;P&gt;
A customer was using memory-mapped files and was looking for
information as to whether access to the memory-mapped data
modifies the value returned by
&lt;CODE&gt;Get&amp;shy;Last&amp;shy;Error&lt;/CODE&gt;.
A member of the kernel team replied,
"No, memory-mapped I/O does not ever change the value returned by
&lt;CODE&gt;Get&amp;shy;Last&amp;shy;Error&lt;/CODE&gt;."
&lt;/P&gt;
&lt;P&gt;
That answer is simultaneously correct and wrong,
a case of
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2011/05/12/10163578.aspx"&gt;
looking at the world through kernel-colored glasses&lt;/A&gt;.
&lt;/P&gt;
&lt;P&gt;
While it's true that the kernel does not ever change the value
returned by
&lt;CODE&gt;Get&amp;shy;Last&amp;shy;Error&lt;/CODE&gt;,
it's also the case that
&lt;I&gt;you&lt;/I&gt; might change it.
&lt;/P&gt;
&lt;P&gt;
If you set up an exception handler, then your
exception handler might perform operations that affect
the last-error code, and those changes will be visible
after the exception handler returns.
(This applies to all exception handlers and filters,
not just ones related to memory-mapped files.)
&lt;/P&gt;
&lt;P&gt;
If you intend to return
&lt;CODE&gt;EXCEPTION_&lt;WBR&gt;CONTINUE_&lt;WBR&gt;EXECUTION&lt;/CODE&gt;
because you handled the exception,
then you probably should make sure to leave the last-error
code the way you found it.
Otherwise, the code that you interrupted and then resumed will have had its
last-error code changed asynchronously.
You just
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2011/02/10/10127054.aspx"&gt;
sabotaged it from above&lt;/A&gt;.
&lt;/P&gt;
&lt;PRE&gt;
&lt;I&gt;// Code in italics is wrong

LONG ExceptionFilter(LPEXCEPTION_POINTERS ExceptionPointers)
{
 if (IsAnExceptionICanRepair(ExceptionPointers)) {
   RepairException(ExceptionPointers);
   // fixed up error; continuing
   return EXCEPTION_CONTINUE_EXECUTION;
 }

 if (IsAnExceptionICanHandle(ExceptionPointers)) {
  // We cannot repair it, but we can handle it.
  return EXCEPTION_EXECUTE_HANDLER;
 }

 // Not our exception. Keep looking.
 return EXCEPTION_CONTINUE_SEARCH;
}&lt;/I&gt;
&lt;/PRE&gt;
&lt;P&gt;
If the &lt;CODE&gt;Is&amp;shy;An&amp;shy;Exception&amp;shy;I&amp;shy;Can&amp;shy;Repair&lt;/CODE&gt; function
or
&lt;CODE&gt;Repair&amp;shy;Exception&lt;/CODE&gt; function
does anything that affects the last-error code,
then when the exception filter is executed for a repairable
exception, the last-error code is magically changed without the
mainline code's knowledge.
All the mainline code did was execute stuff normally, and somehow
during a memory access or a floating point operation or some other
seemingly-harmless action, the last-error code spontaneously changed!
&lt;/P&gt;
&lt;P&gt;
If you are going to continue execution at the point the exception was
raised, then you need to "put things back the way you found them"
(except of course for the part where you repair the exception itself).
&lt;/P&gt;
&lt;PRE&gt;
LONG ExceptionFilter(LPEXCEPTION_POINTERS ExceptionPointers)
{
 &lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2011/04/29/10159322.aspx"&gt;&lt;FONT COLOR=blue&gt;PreserveLastError&lt;/FONT&gt;&lt;/A&gt; &lt;FONT COLOR=blue&gt;preserveLastError;&lt;/FONT&gt;

 if (IsAnExceptionICanRepair(ExceptionPointers)) {
   RepairException(ExceptionPointers);
   // fixed up error; continuing
   return EXCEPTION_CONTINUE_EXECUTION;
 }

 if (IsAnExceptionICanHandle(ExceptionPointers)) {
  // We cannot repair it, but we can handle it.
  return EXCEPTION_EXECUTE_HANDLER;
 }

 // Not our exception. Keep looking.
 return EXCEPTION_CONTINUE_SEARCH;
}
&lt;/PRE&gt;
&lt;P&gt;
&lt;B&gt;Exercise&lt;/B&gt;:
Why isn't it important to restore the last error code if
you return &lt;CODE&gt;EXCEPTION_&lt;WBR&gt;EXECUTE_&lt;WBR&gt;HANDLER&lt;/CODE&gt;?
&lt;/P&gt;
&lt;P&gt;
&lt;B&gt;Exercise&lt;/B&gt;:
Is it important to restore the last error code if you return
&lt;CODE&gt;EXCEPTION_&lt;WBR&gt;CONTINUE_&lt;WBR&gt;SEARCH&lt;/CODE&gt;?
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10265660" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Code" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Code/" /></entry><entry><title>The path-searching algorithm is not a backtracking algorithm</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/02/08/10265193.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/02/08/10265193.aspx</id><published>2012-02-08T15:00:00Z</published><updated>2012-02-08T15:00:00Z</updated><content type="html">&lt;P&gt;
Suppose your PATH environment variable looks like this:
&lt;/P&gt;
&lt;PRE&gt;
C:\dir1;\\server\share;C:\dir2
&lt;/PRE&gt;
&lt;P&gt;
Suppose that you call &lt;CODE&gt;LoadLibrary("foo.dll")&lt;/CODE&gt;
intending to load the library at
&lt;CODE&gt;C:\dir2\foo.dll&lt;/CODE&gt;.
If the network server is down, the &lt;CODE&gt;LoadLibrary&lt;/CODE&gt; call
will fail.
Why doesn't it just skip the bad directory in the PATH and
continue searching?
&lt;/P&gt;
&lt;P&gt;
Suppose the &lt;CODE&gt;LoadLibrary&lt;/CODE&gt; function skipped the bad
network directory and kept searching.
Suppose that the code which called
&lt;CODE&gt;LoadLibrary("foo.dll")&lt;/CODE&gt; was really after the file
&lt;CODE&gt;\\server\share\foo.dll&lt;/CODE&gt;.
By taking the server down, you have tricked the &lt;CODE&gt;LoadLibrary&lt;/CODE&gt;
function into loading &lt;CODE&gt;c:\dir2\foo.dll&lt;/CODE&gt; instead.
(And maybe that was your DLL planting attack:
If you can convince the system to reject all the versions on the
&lt;CODE&gt;PATH&lt;/CODE&gt; by some means, you can then get &lt;CODE&gt;Load&amp;shy;Library&lt;/CODE&gt;
to look in the current directory, which is where you put your attack
version of &lt;CODE&gt;foo.dll&lt;/CODE&gt;.)
&lt;/P&gt;
&lt;P&gt;
This can manifest itself in very strange ways if the two
copies of &lt;CODE&gt;foo.dll&lt;/CODE&gt; are not identical,
because the program is now running with a version of &lt;CODE&gt;foo.dll&lt;/CODE&gt;
it was not designed to use.
"My program works okay during the day, but it starts returning
bad data when I try to run between midnight and 3am."
Reason:
The server is taken down for maintenance every night,
so the program ends up running with the version in
&lt;CODE&gt;c:\dir2\foo.dll&lt;/CODE&gt;, which happens to be an incompatible
version of the file.
&lt;/P&gt;
&lt;P&gt;
When the &lt;CODE&gt;LoadLibrary&lt;/CODE&gt; function
is unable to contact &lt;CODE&gt;\\server\share\foo.dll&lt;/CODE&gt;,
it doesn't know whether it's in the
"don't worry, I wasn't expecting the file to be there anyway"
case or in the
"I was hoping to get that version of the file,
don't substitute any bogus ones"
case.
So it plays it safe and assumes it's in the
"don't substitute any bogus ones" and fails the call.
The program can then perform whatever recovery it deems appropriate
when it cannot load its precious &lt;CODE&gt;foo.dll&lt;/CODE&gt; file.
&lt;/P&gt;
&lt;P&gt;
Now consider the case where there is also
a &lt;CODE&gt;c:\dir1\foo.dll&lt;/CODE&gt; file,
but it's corrupted.
If you do a &lt;CODE&gt;LoadLibrary("foo.dll")&lt;/CODE&gt;,
the call will fail with the error
&lt;CODE&gt;ERROR_BAD_EXE_FORMAT&lt;/CODE&gt;
because it found the &lt;CODE&gt;C:\dir1\foo.dll&lt;/CODE&gt; file,
determined that it was corrupted, and gave up.
It doesn't continue searching the path for a better version.
The path-searching algorithm is not a backtracking algorithm.
Once a file is found, the algorithm commits to trying to load
that file (a "cut" in logic programming parlance),
and if it fails, it doesn't backtrack and return
to a previous state to try something else.
&lt;/P&gt;
&lt;P&gt;
&lt;B&gt;Discussion&lt;/B&gt;:
Why does the &lt;CODE&gt;LoadLibrary&lt;/CODE&gt; search algorithm
continue if an invalid directory or drive letter is put on the PATH?
&lt;/P&gt;
&lt;P&gt;
&lt;B&gt;Vaguely related chatter&lt;/B&gt;:
&lt;A HREF="http://blogs.msdn.com/b/ericlippert/archive/2010/10/04/no-backtracking-part-one.aspx"&gt;
No backtracking, Part One&lt;/A&gt;
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10265193" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Code" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Code/" /></entry><entry><title>Microspeak: fit</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/02/07/10264674.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/02/07/10264674.aspx</id><published>2012-02-07T15:00:00Z</published><updated>2012-02-07T15:00:00Z</updated><content type="html">&lt;P&gt;
In Microspeak, &lt;I&gt;fit&lt;/I&gt; is a predicate noun
which is never used on its own but always comes with a modifying adjective.
For something to &lt;I&gt;be a good fit&lt;/I&gt; is for something to be
appropriate or suitable for a particular situation.
The opposite of a &lt;I&gt;good fit&lt;/I&gt; is not
a &lt;I&gt;bad fit&lt;/I&gt;, because that's pejorative.
Rather, something that is not a &lt;I&gt;good fit&lt;/I&gt; is referred to as a
&lt;I&gt;poor fit&lt;/I&gt;.
&lt;/P&gt;
&lt;BLOCKQUOTE CLASS=q&gt;
The purpose of a previewer plug-in is to allow users to view
the media without opening it.
An image editing tool
would not be a good fit for the previewing feature.
(Alternatively, "would be a poor fit for the previewing feature.")
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
To be a &lt;I&gt;good fit&lt;/I&gt; with a particular group is to mesh well
with that group's existing practices and conventions.
&lt;/P&gt;
&lt;BLOCKQUOTE CLASS=q&gt;
The Datacenter Edition of the product is a poor fit for most small businesses.
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
The group in question need not consist of people.
&lt;/P&gt;
&lt;BLOCKQUOTE CLASS=q&gt;
The results are obtained incrementally, which makes it a good fit
for &lt;CODE&gt;IQueryable&amp;lt;T&amp;gt;&lt;/CODE&gt; and LINQ.
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
Microsoft Human Resources loves to
&lt;A HREF="http://microsoftjobsblog.com/blog/three-ps-of-microsoft-part-1/"&gt;
apply the concept of "fit" to people fitting into a job position&lt;/A&gt;.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10264674" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Other" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Other/" /><category term="Microspeak" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Microspeak/" /></entry><entry><title>The story of the mysterious WINA20.386 file</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/02/06/10264229.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/02/06/10264229.aspx</id><published>2012-02-06T15:00:00Z</published><updated>2012-02-06T15:00:00Z</updated><content type="html">&lt;P&gt;
matushorvath
was curious about
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2010/07/20/10040074.aspx#10040368"&gt;
the WINA20.386 file that came with some versions of MS-DOS&lt;/A&gt;.
&lt;/P&gt;
&lt;P&gt;
The WINA20.386 file predates my involvement, but I was able to
find some information on the Internet that explained what it was for.
And it's right there in KB article
&lt;A HREF="http://support.microsoft.com/kb/68655"&gt;Q68655:
Windows 3.0 Enhanced Mode Requires WINA20.386&lt;/A&gt;:
&lt;/P&gt;
&lt;BLOCKQUOTE CLASS=q&gt;
&lt;P&gt;
&lt;B&gt;Windows 3.0 Enhanced Mode Requires WINA20.386&lt;/B&gt;
&lt;/P&gt;
&lt;P&gt;
Windows 3.0 enhanced mode uses a modular architecture
based on what are called virtual device drivers, or VxDs.
VxDs allow pieces of Windows to be replaced to add additional functionality.
WINA20.386 is such a VxD.
(VxDs could be called "structured" patches for Windows.) 
&lt;/P&gt;
&lt;P&gt;
Windows 3.0 enhanced mode considers the state of the A20 line
to be the same in all MS-DOS virtual machines (VMs).
When MS-DOS is loaded in the high memory area (HMA),
this can cause the machine to stop responding (hang)
because of MS-DOS controlling the A20 line.
If one VM is running inside the MS-DOS kernel (in the HMA)
and Windows task switches to another VM in which MS-DOS turns off A20,
the machine hangs when switching back to the VM
that is currently attempting to execute code in the HMA. 
&lt;/P&gt;
&lt;P&gt;
WINA20.386 changes the way Windows 3.0 enhanced mode
handles the A20 line so that Windows treats the A20 status
as local to each VM, instead of global to all VMs.
This corrects the problem. 
&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
(At the time I wrote this,
a certain popular Web search engine kicks up as the top hit
for the exact phrase
"Windows 3.0 Enhanced Mode Requires WINA20.386"
a spam site that copies KB articles in order to drive traffic.
Meanwhile, the actual KB article doesn't show up in the search results.
Fortunately,
&lt;A HREF="http://www.bing.com/search?q=windows+3.0+enhanced+mode+requires+wina20.386"&gt;
Bing got it right&lt;/A&gt;.)
&lt;/P&gt;
&lt;P&gt;
That explanation is clearly written for a technical audience with
deep knowledge of MS-DOS, Windows, and the High Memory Area.
matushorvath suggested that
"a more detailed explanation could be interesting."
I don't know if it's interesting; to me, it's actually quite boring.
But here goes.
&lt;/P&gt;
&lt;P&gt;
The A20 line is a signal on the address bus that specifies
the contents of bit 20 of the linear address of memory being accessed.
If you aren't familiar with the significance of the A20 line,
&lt;A HREF="http://en.wikipedia.org/wiki/A20_line"&gt;
this Wikipedia article provides the necessary background&lt;/A&gt;.
&lt;/P&gt;
&lt;P&gt;
The High Memory Area is a 64KB-sized block of memory
(really, 64KB minus 16 bytes) that becomes accessible when
the CPU is in 8086 mode but the A20 line is enabled.
To free up conventional memory, large portions of MS-DOS
relocate themselves into the HMA.
When a program calls into MS-DOS, it really calls into a stub
which enables the A20 line, calls the real function in the HMA, and then
disables the A20 line before returning to the program.
(The value of the HMA was discovered by my colleague
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2004/12/15/313250.aspx"&gt;
who also discovered the fastest way to get out of virtual-8086 mode&lt;/A&gt;.)
&lt;/P&gt;
&lt;P&gt;
The issue is that by default, Windows treats all MS-DOS device drivers
and MS-DOS itself as global.
A change in one virtual machine affects all virtual machines.
This is done for compatibility reasons;
after all, those old 16-bit device drivers assume that they
are running on a single-tasking operating system.
If you were to run a separate copy of each driver in each virtual machine,
each copy would try to talk to the same physical device,
and bad things would happen because each copy assumed it was the
only code that communicated with that device.
&lt;/P&gt;
&lt;P&gt;
Suppose MS-DOS device drivers were treated as local to each
virtual machine.
Suppose you had a device driver that controlled a
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2005/11/10/491300.aspx"&gt;
traffic signal&lt;/A&gt;,
and as we all know,
one of the cardinal rules of traffic signals is that you never show
green in both directions.
The device driver has two variables: NorthSouthColor and EastWestColor,
and initially both are set to Red.
The copy of the device driver running in the first virtual machine decides
to let traffic flow in the north/south direction,
and it executes code like this:
&lt;/P&gt;
&lt;PRE&gt;
if (EastWestColor != Red) {
 SetEastWestColor(Red);
}
SetNorthSouthColor(Green);
&lt;/PRE&gt;
&lt;P&gt;
Since both variables are initially set to Red, this code sets
the north/south lights to green.
&lt;/P&gt;
&lt;P&gt;
Meanwhile, the copy of the device driver in the second virtual machine
wants to let traffic flow in the east/west direction:
&lt;/P&gt;
&lt;PRE&gt;
if (NorthSouthColor != Red) {
 SetNorthSouthColor(Red);
}
SetEastWestColor(Green);
&lt;/PRE&gt;
&lt;P&gt;
Since we have a separate copy of the device driver in each virtual machine,
the changes made in the first virtual machine do not affect the values
in the second virtual machine.
The second virtual machine sees that both variables are set to Red,
so it merely sets the east/west color to green.
&lt;/P&gt;
&lt;P&gt;
On the other hand, both of these device drivers are unwittingly
controlling the same physical traffic light,
and it just got told to set the lights in both directions to Green.
&lt;/P&gt;
&lt;P&gt;
Oops.
&lt;/P&gt;
&lt;P&gt;
Okay, so Windows defaults drivers to global.
That way, you don't run into the double-bookkeeping problem.
But this causes problems for the code which manages the A20 line:
&lt;/P&gt;
&lt;P&gt;
Consider a system with two virtual machines.
The first one calls into MS-DOS.
The MS-DOS dispatcher enables the A20 line and calls the real function,
but before the function returns, the virtual machine gets pre-empted.
The second virtual machine now runs, and it too calls into MS-DOS.
The MS-DOS dispatcher in the second virtual machine enables the A20 line
and calls into the real function, and after the function returns,
the second virtual machine disables the A20 line and returns to its caller.
The second virtual machine now gets pre-empted, and the
first virtual machine resumes execution.
Oops: It tries to resume execution in the HMA, but the HMA is no longer
there because the second virtual machine disabled the A20 line!
&lt;/P&gt;
&lt;P&gt;
The WINA20.386 driver teaches Windows that the state of the A20
should be treated as a per-virtual-machine state rather than
a global state.
With this new information, the above scenario does not run into a problem
because the changes to the A20 line made by one virtual machine have no
effect on the A20 line in another virtual machine.
&lt;/P&gt;
&lt;P&gt;
matushorvath goes on to add,
"&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2010/07/20/10040074.aspx#10040870"
&gt;I would be very interested in how Windows 3.0 found and loaded this file&lt;/A&gt;.
It seems to me there must have been some magic happening,
e.g. DOS somehow forcing the driver to be loaded by Windows."
&lt;/P&gt;
&lt;P&gt;
Yup, that's what happened,
and there's nothing secret about it.
When Windows starts up, it
&lt;A HREF="http://support.microsoft.com/KB/74516"&gt;
broadcasts an interrupt&lt;/A&gt;.
TSRs and device drivers can listen for this interrupt and respond
by specifying that Windows should
load a custom driver or request that certain ranges
of data should be treated as per-virtual-machine state rather
than global state
(known to the Windows virtual machine manager as
&lt;A HREF="http://www.drdobbs.com/article/printableArticle.jhtml?articleId=184409226"&gt;
instance data&lt;/A&gt;).
MS-DOS itself listens for this interrupt, and when Windows sends
out the "Does anybody have any special requests?" broadcast,
MS-DOS responds,
"Yeah, please load this WINA20.386 driver."
&lt;/P&gt;
&lt;P&gt;
So there you have it, the story of WINA20.386.
Interesting or boring?
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10264229" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="History" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/History/" /></entry><entry><title>The compatibility constraints of error codes, episode 2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/02/03/10263470.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/02/03/10263470.aspx</id><published>2012-02-03T15:00:00Z</published><updated>2012-02-03T15:00:00Z</updated><content type="html">&lt;P&gt;
A customer reported an incompatibility in Windows&amp;nbsp;7:
If A: is a floppy drive and they call
&lt;CODE&gt;Load&amp;shy;Library("A:\\foo.dll")&lt;/CODE&gt;
and there is no disk in the drive,
the &lt;CODE&gt;Load&amp;shy;Library&lt;/CODE&gt; call fails
with the error
&lt;CODE&gt;ERROR_&lt;WBR&gt;NOT_&lt;WBR&gt;READY&lt;/CODE&gt;.
Previous versions of Windows failed with the error
&lt;CODE&gt;ERROR_&lt;WBR&gt;MOD_&lt;WBR&gt;NOT_&lt;WBR&gt;FOUND&lt;/CODE&gt;.
&lt;/P&gt;
&lt;P&gt;
Both error codes are reasonable responses to the situation.
"The module couldn't be found because the drive is not ready."
Programs should treat a failed &lt;CODE&gt;Load&amp;shy;Library&lt;/CODE&gt;
as a failed library load and shouldn't be sensitive to the
precise reason for the error.
(They can display a more specific error to the user based on the error
code, but overall program logic shouldn't depend on the error code.)
&lt;/P&gt;
&lt;P&gt;
Fortunately, the customer discovered this discrepancy during their
pre-release testing and were able to accommodate this change in their
program before ever releasing it.
A sigh of relief from the application compatibility team.
&lt;/P&gt;
&lt;P&gt;
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2005/01/18/355177.aspx"&gt;
Episode 1&lt;/A&gt;.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10263470" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Code" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Code/" /></entry><entry><title>When you are looking for more information, it helps to say what you need the information for</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/02/02/10263027.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/02/02/10263027.aspx</id><published>2012-02-02T15:00:00Z</published><updated>2012-02-02T15:00:00Z</updated><content type="html">&lt;P&gt;
It's often the case that when a question from a customer
gets filtered through a customer liaison,
some context gets lost.
(I'm giving the customer the benefit of the doubt here
and assuming that it's the customer liaison that removed
the context rather than the customer who never provided it.)
Consider the following request:
&lt;/P&gt;
&lt;BLOCKQUOTE CLASS=q&gt;
We would like to know more information about
the method the shell uses to resolve shortcuts.
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
This is kind of a vague question.
It's like asking
"I'd like to know more about the anti-lock braking system
in my car."
There are any number of pieces of information that could be
provided about the anti-lock braking system.
&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;"It requires a Class C data bus."
&lt;LI&gt;"The tire position sensors are on the wheel-axis."
&lt;LI&gt;"It is connected to the brakes."
&lt;LI&gt;"It is shiny."
&lt;/UL&gt;
&lt;P&gt;
When we ask the customer,
"Could you be more specific what type of information you are looking for?"
the response is sometimes
&lt;/P&gt;
&lt;BLOCKQUOTE CLASS=q&gt;
We want to know everything.
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
This is not a helpful clarification.
Do they want to start with Maxwell's Equations and build up from there?
&lt;/P&gt;
&lt;P&gt;
As it happened, in the case of wanting more information
about
&lt;A HREF="http://technet.microsoft.com/magazine/2009.10.windowsconfidential.aspx"&gt;
the method the shell uses to resolve shortcuts&lt;/A&gt;,
they just wanted to know how to disable the search-based algorithm.
&lt;/P&gt;
&lt;P&gt;
This sort of "ask for everything and figure it out later"
phenomenon is quite common.
I remember another customer who wanted to know "everything" about
changing network passwords,
and they wouldn't be any more specific than that,
so we said,
"Well,
you can start with
&lt;A HREF="http://msdn.microsoft.com/library/cc216517.aspx"&gt;
these documents&lt;/A&gt;,
perhaps paying particular attention to
&lt;A HREF="http://msdn.microsoft.com/library/cc246482.aspx"&gt;
this one&lt;/A&gt;,
but if they tell us what they are going to be doing with the information,
we can help steer them to the specific parts that will be most useful
to them."
&lt;/P&gt;
&lt;P&gt;
As it turned out, all the customer really wanted to know was
"When users change their password, is the new password encrypted
on the wire?"
&lt;/P&gt;
&lt;P&gt;
Third example, and then I'll stop.
Another customer wanted to know everything about how Explorer
takes information from the file system and displays it in an Explorer
window.
After asking a series of questions, we eventually figured out that
they in fact didn't want or need a walkthrough of the entire code path
that puts results in the Explorer window.
The customer simply wanted to know
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2010/11/04/10085797.aspx"&gt;
why two specific folders show up in
their Explorer window with names that didn't match the file system name&lt;/A&gt;.
&lt;/P&gt;
&lt;P&gt;
When you ask for more information,
explain what you need the information for,
or at least be more specific what kind of "more information" you need.
That way, you save everybody lots of time.
The people answering your question don't waste their time
gathering information you don't need
(and gathering that information can be quite time-consuming),
and you don't waste your time sifting through all the information
you don't want.
&lt;/P&gt;
&lt;P&gt;
You might say that these people are employing
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2011/12/27/10251210.aspx"&gt;
the &lt;I&gt;for-if&lt;/I&gt; anti-pattern&lt;/A&gt;:
&lt;/P&gt;
&lt;PRE&gt;
foreach (document d in GetAllPossibleDocumentation())
{
 if (d.Topic == "password encryption on the wire") return d;
}
&lt;/PRE&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10263027" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Other" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Other/" /><category term="email" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/email/" /></entry><entry><title>Things I've written that have amused other people, Episode 9</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/02/01/10262516.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/02/01/10262516.aspx</id><published>2012-02-01T15:00:00Z</published><updated>2012-02-01T15:00:00Z</updated><content type="html">&lt;P&gt;
A customer liaison reported that their customer wants to be able
to access their machine without needing a password.
They just want to be able to &lt;CODE&gt;net use * \\machine\share&lt;/CODE&gt;
and be able to access the files right away.
I guess because passwords are confusing, easy to forget,
and just get in the way.
Anyway, the customer discovered that they could do so on
Windows&amp;nbsp;XP
by going to the folder they want to share,
going to the Sharing tab,
then clicking on the &lt;I&gt;If you understand the security risks but want
to share files without running the wizard&lt;/I&gt; link,
&lt;/P&gt;
&lt;IMG WIDTH=368 HEIGHT=455
SRC="http://www.microsoft.com/library/media/1033/windowsxp/mediacenter/images/en-us/YEA_LapTV02.jpg"&gt;
&lt;P&gt;
and then on the &lt;I&gt;Enable File Sharing&lt;/I&gt; dialog,
clicking &lt;I&gt;Just enable file sharing&lt;/I&gt;.
&lt;/P&gt;
&lt;IMG WIDTH=368 HEIGHT=184
SRC="http://www.microsoft.com/library/media/1033/windowsxp/mediacenter/images/en-us/YEA_LapTV03.jpg"&gt;
&lt;P&gt;
What the customer wanted to know was
if there was a way they could automate this process.
&lt;/P&gt;
&lt;P&gt;
My response to the customer liaison went like this:
&lt;/P&gt;
&lt;BLOCKQUOTE CLASS=q&gt;
Your customer has chosen to ignore not one but two security warnings.
Furthermore, since they are looking for an automated way of doing this,
it sounds like they intend on deploying this "feature" to all
the computers in their organization.
Maybe they just enjoy being part of a botnet?
Your customer is basically saying "I wish my computer to have
no network security."
They should at least restrict access to authenticated users.
But if they
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2010/07/22/10041190.aspx"&gt;
if they insist on having their corporate network turned into a spam
farm&lt;/A&gt;,
they can enable the Guest account and say that it can "Access this
computer from the network."
Congratulations, your computers will soon be filled with malware
and porn.
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
That last sentence made it into some people's quotes file.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10262516" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Other" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Other/" /></entry><entry><title>The Freudian typo that will not die: Enchanced video quality</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/31/10262006.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/31/10262006.aspx</id><published>2012-01-31T15:00:00Z</published><updated>2012-01-31T15:00:00Z</updated><content type="html">&lt;P&gt;
While &lt;STRIKE&gt;wasting time&lt;/STRIKE&gt; doing valuable background
research on my computer,
I received the following suggestion:
&lt;/P&gt;
&lt;BLOCKQUOTE CLASS=q&gt;
For enchanced video quality,
&lt;A HREF="http://www.youtube.com/watch?v=oHg5SJYRHA0"&gt;click here&lt;/A&gt;.
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;
It's good to know that
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2007/08/06/4246963.aspx"&gt;
the typo that I first encountered in 1993&lt;/A&gt;
is still alive and kicking.
&lt;/P&gt;
&lt;P&gt;
(And even though it's not important to the story, people will demand
some sort of follow-up, so here it is:
I submitted feedback to the vendor, who said that it was a known
issue fixed in the next update.)
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10262006" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Other" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Other/" /></entry><entry><title>Why does it take Task Manager longer to appear when you start it from the Ctrl+Alt+Del dialog?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/30/10261611.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/30/10261611.aspx</id><published>2012-01-30T15:00:00Z</published><updated>2012-01-30T15:00:00Z</updated><content type="html">&lt;P&gt;
&lt;A HREF="http://gnobal.net/"&gt;
Amit&lt;/A&gt;
was curious why
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2010/07/20/10040074.aspx#10040367"&gt;
it takes longer for Task Manager to appear when you start it
from the &lt;KBD&gt;Ctrl&lt;/KBD&gt;+&lt;KBD&gt;Alt&lt;/KBD&gt;+&lt;KBD&gt;Del&lt;/KBD&gt; dialog&lt;/A&gt;
compared to launching it from the taskbar.
&lt;/P&gt;
&lt;P&gt;
Well, you can see the reason right there on the screen:
You're launching it the long way around.
&lt;/P&gt;
&lt;P&gt;
If you launch Task Manager from the taskbar,
Explorer just launches &lt;CODE&gt;taskmgr.exe&lt;/CODE&gt;
via the usual &lt;CODE&gt;Create&amp;shy;Process&lt;/CODE&gt; mechanism,
and Task Manager launches under the same credentials
on the same desktop.
&lt;/P&gt;
&lt;P&gt;
On the other hand, when you use the secure attention sequence,
the &lt;CODE&gt;winlogon&lt;/CODE&gt; program receives the notification,
switches to the secure desktop,
and displays the &lt;KBD&gt;Ctrl&lt;/KBD&gt;+&lt;KBD&gt;Alt&lt;/KBD&gt;+&lt;KBD&gt;Del&lt;/KBD&gt; dialog.
When you select &lt;I&gt;Task Manager&lt;/I&gt; from that dialog,
it then has to launch &lt;CODE&gt;taskmgr.exe&lt;/CODE&gt;,
but it can't use the normal &lt;CODE&gt;Create&amp;shy;Process&lt;/CODE&gt;
because it's on the wrong desktop and it's running under
the wrong security context.
(Because &lt;CODE&gt;winlogon&lt;/CODE&gt; runs as SYSTEM,
as Task Manager will tell you.)
&lt;/P&gt;
&lt;P&gt;
Clearly, in order to get Task Manager running on your desktop
with your credentials,
&lt;CODE&gt;winlogon&lt;/CODE&gt; needs to change its security context,
change desktops, and then launch &lt;CODE&gt;taskmgr.exe&lt;/CODE&gt;.
The desktop switch is probably the slowest part, since it
involves the video driver,
and video drivers are not known for their blazingly fast
mode changes.
&lt;/P&gt;
&lt;P&gt;
It's like asking why an international package takes longer to deliver
than a domestic one.
Because it's starting from further away, and it also has to go through
customs.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261611" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Other" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Other/" /></entry><entry><title>Does mapping the same shared memory two times in a process lead to double the address space usage?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/27/10261046.aspx</id><published>2012-01-27T15:00:00Z</published><updated>2012-01-27T15:00:00Z</updated><content type="html">&lt;P&gt;
A customer designed a system which uses shared memory.
Specifically, for each database file, they create a corresponding
shared memory block of, say,
200&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2009/06/11/9725386.aspx"&gt;MB&lt;/A&gt;.
Multiple clients which connect to the same database file use
the same shared memory block.
Naturally, if two processes each access the same database file,
each process will map the shared memory block into their respective
address space.
The question arose regarding what happens if one process
connects to the same database file twice.
Will the two calls to &lt;CODE&gt;Map&amp;shy;View&amp;shy;Of&amp;shy;File&lt;/CODE&gt;
share the same address space, or will each one allocate a separate
chunk of address space?
&lt;/P&gt;
&lt;P&gt;
Win32 makes no guarantees what will happen.
All that you can be sure of is that the memory will be mapped
into your address space, and you will get a pointer to it,
and when you're done, you call &lt;CODE&gt;Unmap&amp;shy;View&amp;shy;Of&amp;shy;File&lt;/CODE&gt;.
Whether the two calls return the same pointer is unspecified.
&lt;/P&gt;
&lt;P&gt;
In fact, Windows&amp;nbsp;95 returned the same pointer,
whereas Windows&amp;nbsp;NT returns a different pointer.
We saw this earlier when we intentionally
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2003/10/07/55194.aspx"&gt;
mapped the same shared memory block multiple times&lt;/A&gt;,
and observed somebody actually taking a dependency on this behavior
in order to effect
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2004/10/26/247918.aspx"&gt;
the strangest way of detecting Windows&amp;nbsp;NT&lt;/A&gt;.
Don't take a dependency on this behavior;
who knows, maybe a future version of Windows&amp;nbsp;NT will
consolidate multiple mappings in order to conserve address space.
&lt;/P&gt;
&lt;P&gt;
If you want force this consolidation behavior, you'll have to
roll it yourself,
say with a lookup table of active mappings and a reference count.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261046" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Code" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Code/" /></entry><entry><title>The 2012/2013 Seattle Symphony subscription season at a glance</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/26/10260761.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/26/10260761.aspx</id><published>2012-01-26T15:00:01Z</published><updated>2012-01-26T15:00:01Z</updated><content type="html">&lt;P&gt;
&lt;A HREF="http://blogs.msdn.com/oldnewthing/archive/2006/04/19/578992.aspx"&gt;
Every&lt;/A&gt;
&lt;A HREF="http://blogs.msdn.com/oldnewthing/archive/2007/02/23/1747714.aspx"&gt;
year&lt;/A&gt;,
I put together a
&lt;A HREF="http://blogs.msdn.com/oldnewthing/archive/2008/02/29/7938837.aspx"&gt;
little pocket guide&lt;/A&gt;
&lt;A HREF="http://blogs.msdn.com/oldnewthing/archive/2009/02/03/9392203.aspx"&gt;
to the Seattle Symphony&lt;/A&gt;
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2010/02/08/9959495.aspx"&gt;
subscription&lt;/A&gt;
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2011/01/21/10118483.aspx"&gt;
season&lt;/A&gt;
for my symphony friends to help them decide which
ticket package they want.
As before, you might find it helpful, you might not, but either way,
you're going to have to suffer through it.
Here's the at-a-glance season guide for the 2012/2013 season.
(&lt;A HREF="http://issuu.com/seattlesymphony/docs/seattlesymphony2012-2013season"
&gt;Full brochure&lt;/A&gt;.
&lt;A HREF="http://seattletimes.nwsource.com/html/thearts/2017334389_symphony26.html"&gt;
&lt;I&gt;Seattle Times&lt;/I&gt; coverage&lt;/A&gt;.)
&lt;/P&gt;
&lt;SCRIPT&gt;
function filter(c)
{
 var rows = document.getElementById("schedule").getElementsByTagName("TR");
 for (var i = 0; i != rows.length; i++) {
  var row = rows[i];
  var className = row.className;
  if (className != "") {
   if (c == 'all' || className.indexOf(c) &gt;= 0) {
    row.style.display = "";
   } else {
    row.style.display = "none";
   }
  }
 }
}
&lt;/SCRIPT&gt;
&lt;TABLE ID=schedule STYLE="border: solid 1.5pt black; border-collapse: collapse" BORDERCOLOR=gray RULES=all CELLPADDING=0&gt;
  &lt;COLGROUP SPAN=3 STYLE="padding-left: 1ex; padding-right: 1ex"&gt;&lt;/COLGROUP&gt;
  &lt;TR VALIGN=bottom&gt;
    &lt;TH onclick=filter('all')&gt;Week&lt;/TH&gt;
    &lt;TH onclick=filter('all')&gt;Program&lt;/TH&gt;
    &lt;TH onclick=filter('all')&gt;Comments&lt;/TH&gt;
    &lt;TD ROWSPAN=24 STYLE="border-right: 1pt solid black"&gt;&lt;/TD&gt;
    &lt;TH onclick=filter('21')&gt;&lt;FONT SIZE=-1&gt;21&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('13')&gt;&lt;FONT SIZE=-1&gt;13&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('7AB')&gt;&lt;FONT SIZE=-1&gt;7A&lt;BR&gt;7B&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('7CD')&gt;&lt;FONT SIZE=-1&gt;7C&lt;BR&gt;7D&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TD ROWSPAN=24 STYLE="border-right: 1pt solid black"&gt;&lt;/TD&gt;
    &lt;TH onclick=filter('7EF')&gt;&lt;FONT SIZE=-1&gt;7E&lt;BR&gt;7F&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('7G')&gt;&lt;FONT SIZE=-1&gt;7G&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('4A')&gt;&lt;FONT SIZE=-1&gt;4A&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('BS')&gt;&lt;FONT SIZE=-1&gt;BS&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TD ROWSPAN=24 STYLE="border-right: 1pt solid black"&gt;&lt;/TD&gt;
    &lt;TH onclick=filter('SU')&gt;&lt;FONT SIZE=-1&gt;SU&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('WG')&gt;&lt;FONT SIZE=-1&gt;WG&lt;/FONT&gt;&lt;/TH&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 7AB 4A WG"&gt;
    &lt;TD&gt;09/20&lt;BR&gt;2012&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Berlioz: &lt;I&gt;Roman Carnival&lt;/I&gt; Overture&lt;BR&gt;
        Martin&amp;#367;: Symphony #6 &lt;FONT SIZE=-1&gt;&lt;I&gt;Fantaises symphoniques&lt;/I&gt;&lt;/FONT&gt;&lt;BR&gt;
        Debussy: &lt;I&gt;Nocturnes&lt;/I&gt;: &lt;I&gt;Nuages&lt;/I&gt; and &lt;I&gt;F&amp;ecirc;tes&lt;/I&gt;&lt;BR&gt;
        Respighi: &lt;I&gt;Pines of Rome&lt;/I&gt;&lt;/TD&gt;
    &lt;TD&gt;Good&lt;BR&gt;Nervous&lt;BR&gt;Excellent&lt;BR&gt;Excellent&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7CD 7G"&gt;
    &lt;TD&gt;10/04&lt;BR&gt;2012&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Mussorgsky: &lt;I&gt;Night on Bald Mountain&lt;/I&gt;&lt;BR&gt;
        Tchaikovsky: &lt;I&gt;Rococo Variations&lt;/I&gt;&lt;BR&gt;
        Sibelius: Symphony #1&lt;/TD&gt;
    &lt;TD&gt;Awesome&lt;BR&gt;Good&lt;BR&gt;Excellent&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7EF SU"&gt;
    &lt;TD&gt;10/18&lt;BR&gt;2012&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Beethoven: Coriolan Overture&lt;BR&gt;
        Mozart: Sinfonia Concertante K297b&lt;BR&gt;
        Fujikura: &lt;I&gt;Mina&lt;/I&gt;&amp;dagger;&lt;BR&gt;
        Haydn: Symphony #103 &lt;I&gt;Drum Roll&lt;/I&gt;&lt;/TD&gt;
    &lt;TD&gt;Awesome&lt;BR&gt;Excellent&lt;BR&gt;Wildcard&lt;BR&gt;Awesome&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&lt;BR&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all WG"&gt;
    &lt;TD&gt;10/26&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        &lt;A HREF="http://www.seattlesymphony.org/symphony/press/kit/release_detail.aspx?ID=854"&gt;Sonic Evolution&lt;/A&gt;&lt;/TD&gt;
    &lt;TD&gt;Wildcard&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 7AB 4A"&gt;
    &lt;TD&gt;11/01&lt;BR&gt;2012&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Tchaikovsky: &lt;I&gt;The Snow Maiden&lt;/I&gt; Suite&lt;BR&gt;
        Tchaikovsky: Violin Concerto&lt;BR&gt;
        Prokofiev: Symphony #6&lt;/TD&gt;
    &lt;TD&gt;Good&lt;BR&gt;Awesome&lt;BR&gt;Nervous&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7CD 7G"&gt;
    &lt;TD&gt;11/08&lt;BR&gt;2012&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Adams: &lt;I&gt;Harmonielehre&lt;/I&gt;&lt;BR&gt;
        Beethoven: Piano Concerto #5&lt;/TD&gt;
    &lt;TD&gt;Polarizing&lt;BR&gt;Awesome&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7EF 7G"&gt;
    &lt;TD&gt;11/15&lt;BR&gt;2012&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Brahms: Piano Concerto #2&lt;BR&gt;
        Dutilleux: &lt;I&gt;The Shadow of Time&lt;/I&gt;&lt;BR&gt;
        R. Strauss: &lt;I&gt;Till Eulenspiegel&lt;/I&gt;&lt;/TD&gt;
    &lt;TD&gt;Awesome&lt;BR&gt;Nervous&lt;BR&gt;Good&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7CD BS WG"&gt;
    &lt;TD&gt;11/29&lt;BR&gt;2012&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Berg: Violin Concerto&lt;BR&gt;
        Mahler: Symphony #4&lt;/TD&gt;
    &lt;TD&gt;Polarizing&lt;BR&gt;Polarizing&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&lt;BR&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7EF SU"&gt;
    &lt;TD&gt;01/10&lt;BR&gt;2013&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Stravinsky: &lt;I&gt;Pulcinella&lt;/I&gt; Suite&lt;BR&gt;
        Mendelssohn: Piano Concerto #1&lt;BR&gt;
        Mozart: Symphony #39&lt;/TD&gt;
    &lt;TD&gt;Excellent&lt;BR&gt;Excellent&lt;BR&gt;Awesome&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 7AB"&gt;
    &lt;TD&gt;01/31&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Messiaen: &lt;I&gt;&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2007/08/22/4500832.aspx"&gt;Turangal&amp;icirc;la Symphony&lt;/A&gt;&lt;/I&gt;&lt;/TD&gt;
    &lt;TD&gt;Polarizing&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7CD 7G"&gt;
    &lt;TD&gt;02/07&lt;BR&gt;2013&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Rossini: &lt;I&gt;William Tell&lt;/I&gt; Overture&lt;BR&gt;
        Schumann: Piano Concerto&lt;BR&gt;
        Brahms: Symphony #4&lt;/TD&gt;
    &lt;TD&gt;Awesome&lt;BR&gt;Excellent&lt;BR&gt;Awesome&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 7AB SU"&gt;
    &lt;TD&gt;02/14&lt;BR&gt;2013&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        (Rossini: &lt;I&gt;William Tell&lt;/I&gt; Overture)&lt;BR&gt;
        Faure: &lt;I&gt;Pell&amp;eacute;as et M&amp;eacute;lisande&lt;/I&gt; Suite&lt;BR&gt;
        Mozart: Piano Concerto #21&lt;BR&gt;
        Ravel: &lt;I&gt;Sh&amp;eacute;herazade&lt;/I&gt;&lt;BR&gt;
        Szymanowski: Symphony #4&lt;/TD&gt;
    &lt;TD&gt;Awesome&lt;BR&gt;Good&lt;BR&gt;Awesome&lt;BR&gt;Nervous&lt;BR&gt;Nervous&lt;/TD&gt;
    &lt;TD&gt;&lt;BR&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&lt;BR&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;BR&gt;&lt;BR&gt;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 7AB BS"&gt;
    &lt;TD&gt;03/14&lt;BR&gt;2013&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Tippett: &lt;FONT SIZE=-1&gt;&lt;I&gt;The Midsummer Marriage: Ritual Dances&lt;/I&gt;&lt;/FONT&gt;&lt;BR&gt;
        Bruch: Violin Concerto #1&lt;BR&gt;
        Elgar: &lt;I&gt;Enigma Variations&lt;/I&gt;&lt;/TD&gt;
    &lt;TD&gt;Nervous&lt;BR&gt;Awesome&lt;BR&gt;Excellent&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&lt;BR&gt;&lt;BR&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7EF 4A BS WG"&gt;
    &lt;TD&gt;03/21&lt;BR&gt;2013&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Mozart: &lt;I&gt;Don Giovanni&lt;/I&gt; Overture&lt;BR&gt;
        Britten: Cello Symphony&lt;BR&gt;
        Beethoven: Symphony #5&lt;/TD&gt;
    &lt;TD&gt;Awesome&lt;BR&gt;Nervous&lt;BR&gt;Awesome&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&lt;BR&gt;&lt;BR&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7CD SU"&gt;
    &lt;TD&gt;03/28&lt;BR&gt;2013&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Liadov: &lt;I&gt;The Enchanted Lake&lt;/I&gt;&lt;BR&gt;
        Kancheli: &lt;I&gt;Styx&lt;/I&gt;&lt;BR&gt;
        Rimsky-Korsakov: &lt;I&gt;Scheherezade&lt;/I&gt;&lt;/TD&gt;
    &lt;TD&gt;Okay&lt;BR&gt;Nervous&lt;BR&gt;Awesome&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7EF 4A"&gt;
    &lt;TD&gt;04/13&lt;BR&gt;2013&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Mozart: Piano Concerto #9&lt;BR&gt;
        Bruckner: Symphony #4 &lt;I&gt;Romantic&lt;/I&gt;&lt;/TD&gt;
    &lt;TD&gt;Awesome&lt;BR&gt;Excellent&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 7AB"&gt;
    &lt;TD&gt;04/18&lt;BR&gt;2013&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Antheil: &lt;I&gt;A Jazz Symphony&lt;/I&gt;&lt;BR&gt;
        Gruber: Percussion Concerto &lt;I&gt;Rough Music&lt;/I&gt;&lt;BR&gt;
        Bernstein: &lt;I&gt;On the Waterfront&lt;/I&gt; Suite&lt;BR&gt;
        Stravinsky: &lt;I&gt;The Firebird&lt;/I&gt; Suite&lt;/TD&gt;
    &lt;TD&gt;Excellent&lt;BR&gt;Okay&lt;BR&gt;Good&lt;BR&gt;Excellent&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7CD SU WG"&gt;
    &lt;TD&gt;04/25&lt;BR&gt;2013&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Sibelius: &lt;I&gt;Karelia Overture&lt;/I&gt;&lt;BR&gt;
        Sibelius: Violin Concerto&lt;BR&gt;
        Zavaro: New Work&amp;dagger;&lt;BR&gt;
        Beethoven: Symphony #7&lt;/TD&gt;
    &lt;TD&gt;Good&lt;BR&gt;Awesome&lt;BR&gt;Wildcard&lt;BR&gt;Awesome&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR&gt;&lt;BR&gt;&lt;DIV STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7EF 7G"&gt;
    &lt;TD&gt;05/30&lt;BR&gt;2013&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Smetana: &lt;I&gt;Wallenstein's Camp&lt;/I&gt;&lt;BR&gt;
        Beethoven: Violin Concerto&lt;BR&gt;
        Dvo&amp;#345;&amp;aacute;k: Symphony #6&lt;/TD&gt;
    &lt;TD&gt;Excellent&lt;BR&gt;Awesome&lt;BR&gt;Awesome&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 13 7CD"&gt;
    &lt;TD&gt;06/13&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Britten: &lt;I&gt;War Requiem&lt;/I&gt;&lt;/TD&gt;
    &lt;TD&gt;Nervous&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 7EF 7G"&gt;
    &lt;TD&gt;06/20&lt;BR&gt;2013&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Shostakovich: Violin Concerto #1&lt;BR&gt;
        John Luther Adams: &lt;I&gt;Become Ocean&lt;/I&gt;&amp;dagger;&lt;/TD&gt;
    &lt;TD&gt;Nervous&lt;BR&gt;Okay&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR CLASS="all 21 7AB 7G"&gt;
    &lt;TD&gt;06/27&lt;BR&gt;2013&lt;/TD&gt;
    &lt;TD NOWRAP&gt;
        Saint-Sa&amp;euml;ns: &lt;I&gt;Organ&lt;/I&gt; Symphony&lt;BR&gt;
        Wagner: &lt;I&gt;Tristan&lt;/I&gt;: &lt;I&gt;Prelude&lt;/I&gt; and &lt;I&gt;Liebestod&lt;/I&gt;&lt;BR&gt;
        Wagner: &lt;FONT SIZE=-1&gt;&lt;I&gt;Tannh&amp;auml;user&lt;/I&gt; Overture and &lt;I&gt;Venusberg Music&lt;/I&gt;&lt;/FONT&gt;&lt;/TD&gt;
    &lt;TD&gt;Awesome&lt;BR&gt;Okay&lt;BR&gt;Excellent&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD STYLE="background: #FF6600"&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR VALIGN=top&gt;
    &lt;TH onclick=filter('all')&gt;Week&lt;/TH&gt;
    &lt;TH onclick=filter('all')&gt;Program&lt;/TH&gt;
    &lt;TH onclick=filter('all')&gt;Comments&lt;/TH&gt;
    &lt;TH onclick=filter('21')&gt;&lt;FONT SIZE=-1&gt;21&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('13')&gt;&lt;FONT SIZE=-1&gt;13&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('7AB')&gt;&lt;FONT SIZE=-1&gt;7A&lt;BR&gt;7B&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('7CD')&gt;&lt;FONT SIZE=-1&gt;7C&lt;BR&gt;7D&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('7EF')&gt;&lt;FONT SIZE=-1&gt;7E&lt;BR&gt;7F&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('7G')&gt;&lt;FONT SIZE=-1&gt;7G&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('4A')&gt;&lt;FONT SIZE=-1&gt;4A&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('BS')&gt;&lt;FONT SIZE=-1&gt;BS&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('SU')&gt;&lt;FONT SIZE=-1&gt;SU&lt;/FONT&gt;&lt;/TH&gt;
    &lt;TH onclick=filter('WG')&gt;&lt;FONT SIZE=-1&gt;WG&lt;/FONT&gt;&lt;/TH&gt;
  &lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
Legend:
&lt;/P&gt;
&lt;TABLE STYLE="border: solid black .75pt; border-collapse: collapse" RULES=all&gt;
    &lt;TR&gt;&lt;TD&gt;21&lt;/TD&gt;&lt;TD&gt;Masterworks 21-concert series (Choice of Thursdays or Saturdays)&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;Masterworks 13-concert series (Choice of Thursdays or Saturdays)&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;&lt;TD&gt;7A&lt;/TD&gt;&lt;TD&gt;Masterworks 7-concert series A (Thursdays)&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;&lt;TD&gt;7B&lt;/TD&gt;&lt;TD&gt;Masterworks 7-concert series B (Saturdays)&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;&lt;TD&gt;7C&lt;/TD&gt;&lt;TD&gt;Masterworks 7-concert series C (Thursdays)&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;&lt;TD&gt;7D&lt;/TD&gt;&lt;TD&gt;Masterworks 7-concert series D (Saturdays)&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;&lt;TD&gt;7E&lt;/TD&gt;&lt;TD&gt;Masterworks 7-concert series E (Thursdays)&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;&lt;TD&gt;7F&lt;/TD&gt;&lt;TD&gt;Masterworks 7-concert series F (Saturdays)&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;&lt;TD&gt;7G&lt;/TD&gt;&lt;TD&gt;Masterworks 7-concert series G (Sunday afternoons)&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;&lt;TD&gt;4A&lt;/TD&gt;&lt;TD&gt;Masterworks 4-concert series A (Friday afternoons)&lt;/TD&gt;&lt;/TR&gt;
    &lt;TR&gt;&lt;TD&gt;BS&lt;/TD&gt;
        &lt;TD&gt;&lt;A HREF="http://beyondthescore.org/"&gt;Beyond the Score&lt;/A&gt; 
            multimedia lecture-concert (Sunday afternoons)&lt;BR&gt;
    &lt;TR&gt;&lt;TD&gt;SU&lt;/TD&gt;&lt;TD&gt;Symphony Untuxed (Fridays)&lt;/TD&gt;
    &lt;TR&gt;&lt;TD&gt;WG&lt;/TD&gt;&lt;TD&gt;&lt;A HREF="http://www.seattlesymphony.org/symphony/buy/wolfgang/"&gt;WolfGang&lt;/A&gt; (Various evenings)&lt;/TD&gt;
    &lt;TR&gt;&lt;TD&gt;&amp;dagger;&lt;/TD&gt;&lt;TD&gt;Premiere&lt;/TD&gt;
&lt;/TABLE&gt;
&lt;P&gt;
For those not familiar with the Seattle Symphony ticket package line-ups:
Most of the ticket packages are named &lt;I&gt;Masterworks nX&lt;/I&gt; where
&lt;I&gt;n&lt;/I&gt; is
the number is the number of concerts in the package, and the letter
indicates which variation.
Ticket packages have been combined if they are
identical save for the day of the week.
For example, 7C and 7D are the same concerts;
the only difference is that 7C is for Thursday nights, while 7D is
for Saturday nights.
The &lt;I&gt;Beyond the Score&lt;/I&gt; concerts focus on only one of the pieces.
The &lt;I&gt;WolfGang&lt;/I&gt; series is available only to members of the
&lt;A HREF="http://www.seattlesymphony.org/symphony/buy/wolfgang/"&gt;
WolfGang club&lt;/A&gt;.
&lt;/P&gt;
&lt;P&gt;
This chart doesn't include "one-off" concert series such
as the Mainly Mozart or Distinguished Artists series.
A "one-off" series is a concert series which shares no concerts
with any other series.
&lt;/P&gt;
&lt;P&gt;
Changes from last season:
&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The Rush Hour series was redesigned and became the
    Symphony Untuxed series.
&lt;LI&gt;Symphony Specials was dropped.
&lt;LI&gt;The 
    Baroque &amp;amp; Wine Series and
    Mainly Mozart concerts still exist,
    but I dropped them from the table since they are
    now one-off series.
&lt;LI&gt;WolfGang already existed but I added it to the list
    now that there's room for it.
&lt;/UL&gt;
&lt;/P&gt;
&lt;P&gt;
The comments column very crudely categorizes the works
to assist my less-classically-aware friends.
This is, of course, a highly subjective rating system,
but I tried to view each piece from the ears of my symphony friends.
Thus, I rated downward pieces that I personally like
but which others might not and rated up pieces that I may not
find musically satisfying but which nevertheless tend to be
crowd-pleasers.
&lt;/P&gt;
&lt;P&gt;
These predictions have, of course, proven wrong in the past.
&lt;/P&gt;
&lt;P&gt;
Here's what the comments mean.
Note that they do not indicate whether the piece is significant in
a musicological sense; they're just my guess as to whether my friends
are going to like it.
(For example,
I know that my friends don't like minimalism,
and I suspect they don't like serialism,
so I rated the Adams and Berg down even though I think they're quite good.
They also don't like vocal pieces.
On the other hand, it turns out that I overcame my
Bruckner jinx,
so I can at least give the Bruckner a positive score this time.
Let's just hope it's
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2010/02/08/9959495.aspx"&gt;
not the Hass edition&lt;/A&gt;.)
&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Awesome: Guaranteed crowd-pleaser.
&lt;LI&gt;Excellent: You will definitely like this piece.
&lt;LI&gt;Good: You will probably like this piece.
&lt;LI&gt;Okay: You may like this piece.
&lt;LI&gt;Nervous: I have a bad feeling about this one.
&lt;LI&gt;Polarizing: Some people will love it; others will hate it.
&lt;LI&gt;Wildcard: I have no idea what will happen.
&lt;/UL&gt;
&lt;P&gt;
In many cases, I am not familiar with the piece
and am basing my evaluation on what I know about the composer
(or am just guessing).
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10260761" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Non-Computer" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Non_2D00_Computer/" /></entry><entry><title>Why doesn't the Windows 7 Start menu have a pushpin for pinning items?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/26/10260688.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/26/10260688.aspx</id><published>2012-01-26T15:00:00Z</published><updated>2012-01-26T15:00:00Z</updated><content type="html">&lt;P&gt;
You may have noticed a minor inconsistency between pinning a program
to the Start menu and pinning a destination to a program's
Jump List.
Although pinned items appear at the top of the respective lists,
and both the Start menu and Jump List let you right-click an
item and select Pin/Unpin,
the Jump List also lets you pin and unpin an item by clicking on the
pushpin.
Why doesn't the Start menu have a pushpin in addition to the
right-click menu?
&lt;/P&gt;
&lt;P&gt;
For a time, items on the Start menu did have a pushpin,
just like items on Jump Lists.
The design had a few problems, however.
Start menu items can also have a triangle
indicating the presence of a flyout menu,
and the presence of two indicators next to an item made the interface
look awkward and too busy.
And what do you do if an item has only one indicator?
Do you right-justify all the indicators?
Or do you place the indicators in columns and reserve blank
space for the missing ones?
&lt;/P&gt;
&lt;TABLE&gt;
&lt;TR&gt;
&lt;TD&gt;
 &lt;TABLE STYLE="border: solid .75pt black"&gt;
 &lt;TR VALIGN=baseline&gt;
  &lt;TD ALIGN=left&gt;Internet Explorer&lt;/TD&gt;
  &lt;TD ALIGN=right&gt;&amp;#xA4; &amp;#x25B6;&lt;/TD&gt;
 &lt;/TR&gt;
 &lt;TR VALIGN=baseline&gt;
  &lt;TD ALIGN=left&gt;Command Prompt&lt;/TD&gt;
  &lt;TD ALIGN=right&gt;&amp;#xA4;&lt;/TD&gt;
 &lt;/TR&gt;
 &lt;TR VALIGN=baseline&gt;
  &lt;TD ALIGN=left&gt;Notepad&lt;/TD&gt;
  &lt;TD ALIGN=right&gt;&amp;#x25B6;&lt;/TD&gt;
 &lt;/TR&gt;
 &lt;TR VALIGN=baseline&gt;
  &lt;TD ALIGN=left&gt;Calculator&lt;/TD&gt;
  &lt;TD ALIGN=right&gt;&amp;nbsp;&lt;/TD&gt;
 &lt;/TR&gt;
 &lt;/TABLE&gt;
&lt;/TD&gt;
&lt;TD&gt;
 &lt;TABLE STYLE="border: solid .75pt black"&gt;
 &lt;TR VALIGN=baseline&gt;
  &lt;TD ALIGN=left&gt;Internet Explorer&lt;/TD&gt;
  &lt;TD ALIGN=center&gt;&amp;#xA4;&lt;/TD&gt;
  &lt;TD ALIGN=center&gt;&amp;#x25B6;&lt;/TD&gt;
 &lt;/TR&gt;
 &lt;TR VALIGN=baseline&gt;
  &lt;TD ALIGN=left&gt;Command Prompt&lt;/TD&gt;
  &lt;TD ALIGN=center&gt;&amp;#xA4;&lt;/TD&gt;
  &lt;TD ALIGN=center&gt;&amp;nbsp;&lt;/TD&gt;
 &lt;/TR&gt;
 &lt;TR VALIGN=baseline&gt;
  &lt;TD ALIGN=left&gt;Notepad&lt;/TD&gt;
  &lt;TD ALIGN=center&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;TD ALIGN=center&gt;&amp;#x25B6;&lt;/TD&gt;
 &lt;/TR&gt;
 &lt;TR VALIGN=baseline&gt;
  &lt;TD ALIGN=left&gt;Calculator&lt;/TD&gt;
  &lt;TD ALIGN=center&gt;&amp;nbsp;&lt;/TD&gt;
  &lt;TD ALIGN=center&gt;&amp;nbsp;&lt;/TD&gt;
 &lt;/TR&gt;
 &lt;/TABLE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
Both look ugly for different reasons.
The right-justify-everything version looks ugly because the pushpin
appears to keep moving around.
The blank-space-if-no-flyout version looks ugly because you have
a pushpin hovering in the middle of nowhere.
(Imagine trying to click on one of these things: You just have
to "know" that the magic click spot for pinning an item
is 20 pixels to the left of the far right edge.)
&lt;/P&gt;
&lt;P&gt;
But the real death blow to showing a pushpin for pinning items
to the Start menu was the usability testing.
Users had trouble figuring out where to click to pin an item
or to open the Jump List and frequently got the opposite of what
they wanted.
Since opening the Jump List is by far the more common operation,
it won the battle of the prominent UI affordance,
and the option for pinning and unpinning was left to a context
menu.
&lt;/P&gt;
&lt;P&gt;
Which, as it happens, is where the pin/unpin option started
in the first place.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10260688" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="History" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/History/" /></entry><entry><title>How do I disable the fault-tolerant heap?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/25/10260334.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/25/10260334.aspx</id><published>2012-01-25T15:00:00Z</published><updated>2012-01-25T15:00:00Z</updated><content type="html">&lt;P&gt;
A while back, I
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2010/03/31/9987780.aspx"&gt;
linked to&lt;/A&gt;
a talk by Silviu Calinoiu
on
&lt;A HREF="http://channel9.msdn.com/shows/Going+Deep/Silviu-Calinoiu-Inside-Windows-7-Fault-Tolerant-Heap/"&gt;
the fault-tolerant heap&lt;/A&gt;.
But what if you don't want the fault-tolerant heap?
For example,
during program development, you probably want to disable
the fault-tolerant heap for your program:
If the program is crashing, then it should &lt;I&gt;crash&lt;/I&gt;
so you can debug it!
&lt;/P&gt;
&lt;P&gt;
Method&amp;nbsp;1
is to
&lt;A HREF="http://msdn.microsoft.com/library/dd744764.aspx"&gt;
disable the fault-tolerant heap globally&lt;/A&gt;.
While this prevents the fault-tolerant heap from auto-activating
in the future,
it does not go back and undo activations that were enabled in the past.
In other words, you have to remember to do this &lt;I&gt;before&lt;/I&gt;
your application crashes for the first time.
&lt;/P&gt;
&lt;P&gt;
Therefore, you probably want to combine Method&amp;nbsp;1 with
Method&amp;nbsp;2 on the same page,
where it gives instructions on how to
reset the list of applications for which the fault-tolerant heap
is enabled.
&lt;/P&gt;
&lt;P&gt;
Mario Raccagni provides a third way of disabling
the fault tolerant heap, this time for one specific process
instead of globally.
&lt;A HREF="http://blogs.msdn.com/b/itasupport/archive/2009/10/08/come-disabilitare-il-fault-tolerant-heap.aspx"&gt;
His explanation is in Italian&lt;/a&gt;,
so you get to exercise your translation skills.
&lt;/P&gt;
&lt;P&gt;
tl;dr version: Go to the
&lt;CODE&gt;HKEY_&lt;WBR&gt;LOCAL_&lt;WBR&gt;MACHINE&lt;/CODE&gt; and
&lt;CODE&gt;HKEY_&lt;WBR&gt;CURRENT_&lt;WBR&gt;USER&lt;/CODE&gt; versions of
&lt;CODE&gt;Software\&lt;WBR&gt;Microsoft\&lt;WBR&gt;Windows NT\&lt;WBR&gt;CurrentVersion\&lt;WBR
&gt;AppCompatFlags\&lt;WBR&gt;Layers\&lt;WBR&gt;&lt;/CODE&gt;&lt;I&gt;your_application.exe&lt;/I&gt;
and delete the &lt;CODE&gt;Fault&amp;shy;Tolerant&amp;shy;Heap&lt;/CODE&gt; entry.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10260334" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Code" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Code/" /></entry><entry><title>A single-handed effort to keep the memory of $2 bills alive</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/24/10259826.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/24/10259826.aspx</id><published>2012-01-24T15:00:00Z</published><updated>2012-01-24T15:00:00Z</updated><content type="html">&lt;P&gt;
As I noted when I told the story of
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2009/11/24/9927970.aspx"&gt;
the computer programmer who dabbled in making change&lt;/A&gt;
that my colleague had a lot of money-related quirks.
&lt;/P&gt;
&lt;P&gt;
For some reason my colleague felt the $2 bill deserved more attention.
Every so often, he would go to the bank and buy $100 in $2 bills,
then reintroduce the bills into circulation and enjoy people's
reactions to them.
(Most cashiers looked at it and recognized that it was legal tender,
but couldn't find a good place to put it in the till.
It usually got tossed under the drawer with all the checks.)
&lt;/P&gt;
&lt;P&gt;
It was a regular occurrence that
the bank didn't have that many $2 bills on hand, but they
managed to find them and let him know when he could come pick them up.
&lt;/P&gt;
&lt;P&gt;
One time, the bank called him back.
"Hi, we asked all our branches in the entire county, but all together
we can't find enough $2 bills.
If you want, we can place an order with the Federal Reserve.
The catch is, though, that the minimum order is $2000."
&lt;/P&gt;
&lt;P&gt;
"Sure, go ahead and place the order."
&lt;/P&gt;
&lt;P&gt;
Some time later, he went in to pick up his huge stack of $2 bills.
&lt;/P&gt;
&lt;P&gt;
My colleague now found himself in a situation where something fun
turned into an ordeal,
like a smoker who is forced to smoke an entire pack of cigarettes at
one sitting.
Or in this case, more like 1000 cigarettes.
&lt;/P&gt;
&lt;P&gt;
At the end of group meals at a restaurant,
after everybody had calculated their share
and put their money in the bill holder
(this being the days when people
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2009/08/31/9889168.aspx"&gt;
actually paid cash for things&lt;/A&gt;),
he would raid the bill holder for change,
taking out all the notes greater than $2 and replacing them with the
appropriate number of $2 bills.
As a result, when the servers came to collect the bill holders,
they found them stuffed with $1 and $2 bills (mostly $2).
&lt;/P&gt;
&lt;P&gt;
Too bad he didn't
&lt;A HREF="http://www.instructables.com/id/2-Bill-Pad/"&gt;
make a pad out of them&lt;/a&gt;.
&lt;/P&gt;
&lt;P&gt;
&lt;B&gt;Bonus reading&lt;/B&gt;:
&lt;A HREF="http://www.npr.org/2011/06/28/137394348/-1-billion-that-nobody-wants"&gt;
$1 billion that nobody wants&lt;/A&gt;.
&lt;A HREF="http://www.npr.org/blogs/money/2011/12/13/143668605/the-tuesday-podcast-dollar-coins-are-done"&gt;
Follow-up&lt;/A&gt;.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10259826" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Non-Computer" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Non_2D00_Computer/" /></entry><entry><title>Can OANOCACHE be used for non-debug purposes?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/23/10259472.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/23/10259472.aspx</id><published>2012-01-23T15:00:00Z</published><updated>2012-01-23T15:00:00Z</updated><content type="html">&lt;P&gt;
Friday asks whether
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2009/11/27/9929238.aspx#9929574"&gt;
OANOCACHE can be used for non-debug purposes, say
to improve stability and/or speed&lt;/A&gt;.
&lt;/P&gt;
&lt;P&gt;
You can try, but it's not recommended.
For one thing, it probably damages stability,
because there are many applications out there which unwittingly rely
on the BSTR cache to protect them from heap corruption bugs.
The Windows team has for years wanted to tweak the BSTR cache
(even going so far as getting rid of it entirely),
but the compatibility issues always return and quash any
attempts at radical restructuring.
&lt;/P&gt;
&lt;P&gt;
Identifying applications that rely on the BSTR cache and
deploying an appropriate compatibility shim would be one thing.
It's applications which support third party plug-ins that
are the sticky point.
You say, "Okay, this application is fine, we'll use the new
BSTR cache behavior" and then it loads a plug-in DLL that
requires the old BSTR cache behavior.
Now you're stuck since you don't have a time machine.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10259472" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Code" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Code/" /></entry><entry><title>How do FILE_FLAG_SEQUENTIAL_SCAN and FILE_FLAG_RANDOM_ACCESS affect how the operating system treats my file?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/20/10258690.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/20/10258690.aspx</id><published>2012-01-20T15:00:00Z</published><updated>2012-01-20T15:00:00Z</updated><content type="html">&lt;P&gt;
There are two flags you can pass to the
&lt;CODE&gt;Create&amp;shy;File&lt;/CODE&gt; function to provide hints regarding
your program's file access pattern.
What happens if you pass either of them, or neither?
&lt;/P&gt;
&lt;P&gt;
&lt;B&gt;Note that the following description is not contractual.&lt;/B&gt;
It's just an explanation of the current heuristics (where "current"
means "Windows&amp;nbsp;7").
These heuristics &lt;I&gt;have changed&lt;/I&gt; at each version of Windows,
so consider this information as a tip to help you choose an appropriate
access pattern flag in your program,
not a guarantee that the cache manager will behave in a specific way
if you do a specific thing.
&lt;/P&gt;
&lt;P&gt;
If you pass the
&lt;CODE&gt;FILE_&lt;WBR&gt;FLAG_&lt;WBR&gt;SEQUENTIAL_&lt;WBR&gt;SCAN&lt;/CODE&gt;
flag, then the cache manager alters its behavior in two ways:
First, the amount of prefetch is doubled compared to what it would have been
if you hadn't passed the flag.
Second, the cache manager marks as available for re-use
those cache pages which
lie entirely behind the current file pointer (assuming there are no other
applications using the file).
After all, by saying that you are accessing the file sequentially,
you're promising that the file pointer will always move forward.
&lt;/P&gt;
&lt;P&gt;
At the opposite extreme is
&lt;CODE&gt;FILE_&lt;WBR&gt;FLAG_&lt;WBR&gt;RANDOM_&lt;WBR&gt;ACCESS&lt;/CODE&gt;.
In the random access case,
the cache manager performs no prefetching, and it does not
aggressively evict pages that lie behind the file pointer.
Those pages (as well as the pages that lie ahead of the file pointer
which you already read from or wrote to) will age out of the cache according
to the usual most-recently-used policy,
which means that heavy random reads against a file will not pollute the
cache (the new pages will replace the old ones).
&lt;/P&gt;
&lt;P&gt;
In between is the case where you pass neither flag.
&lt;/P&gt;
&lt;P&gt;
If you pass neither flag, then the cache manager tries to detect
your program's file access pattern.
This is where things get weird.
&lt;/P&gt;
&lt;P&gt;
If you issue a read that begins where the previous read left off,
then the cache manager performs some prefetching, but not as much
as if you had passed
&lt;CODE&gt;FILE_&lt;WBR&gt;FLAG_&lt;WBR&gt;SEQUENTIAL_&lt;WBR&gt;SCAN&lt;/CODE&gt;.
If sequential access is detected, then pages behind the file pointer
are also evicted from the cache.
If you issue around six reads in a row, each of which begins where the
previous one left off, then the cache manager
switches to
&lt;CODE&gt;FILE_&lt;WBR&gt;FLAG_&lt;WBR&gt;SEQUENTIAL_&lt;WBR&gt;SCAN&lt;/CODE&gt; behavior
for your file,
but once you issue a read that no longer begins where the previous
read left off, the cache manager revokes your
temporary
&lt;CODE&gt;FILE_&lt;WBR&gt;FLAG_&lt;WBR&gt;SEQUENTIAL_&lt;WBR&gt;SCAN&lt;/CODE&gt; status.
&lt;/P&gt;
&lt;P&gt;
If your reads are not sequential, but they still follow a pattern where
the file offset changes by the same amount between each operation
(for example, you seek to position 100,000 and read some data,
then seek to position 150,000 and read some data,
then seek to position 200,000 and read some data),
then the cache manager will use that pattern to predict the next read.
In the above example, the cache manager will predict that your next
read will begin at position 250,000.
(This prediction works for decreasing offsets, too!)
As with auto-detected sequential scans,
the prediction stops as soon as you break the pattern.
&lt;/P&gt;
&lt;P&gt;
Since people like charts, here's a summary of the above
in tabular form:
&lt;/P&gt;
&lt;TABLE BORDER=1 BORDERCOLOR=black STYLE="border-collapse: collapse"
    CELLPADDING=3&gt;
&lt;TR&gt;
    &lt;TH&gt;Access pattern&lt;/TH&gt;
    &lt;TH&gt;Prefetch&lt;/TH&gt;
    &lt;TH&gt;Evict-behind&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD&gt;Explicit random&lt;/TD&gt;
    &lt;TD&gt;No&lt;/TD&gt;
    &lt;TD&gt;No&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD&gt;Explicit sequential&lt;/TD&gt;
    &lt;TD&gt;Yes (2&amp;times;)&lt;/TD&gt;
    &lt;TD&gt;Yes&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD&gt;Autodetected sequential&lt;/TD&gt;
    &lt;TD&gt;Yes&lt;/TD&gt;
    &lt;TD&gt;Yes&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD&gt;Autodetected very sequential&lt;/TD&gt;
    &lt;TD&gt;Yes (2&amp;times;)&lt;/TD&gt;
    &lt;TD&gt;Yes&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD&gt;Autodetected linear&lt;/TD&gt;
    &lt;TD&gt;Yes&lt;/TD&gt;
    &lt;TD&gt;?&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD&gt;None&lt;/TD&gt;
    &lt;TD&gt;No&lt;/TD&gt;
    &lt;TD&gt;?&lt;/TD&gt;
&lt;/TABLE&gt;
&lt;P&gt;
There are some question marks in the above table where I'm not
sure exactly what the answer is.
&lt;/P&gt;
&lt;P&gt;
&lt;B&gt;Note&lt;/B&gt;:
These cache hints apply only if you use
&lt;CODE&gt;Read&amp;shy;File&lt;/CODE&gt; (or moral equivalents).
Memory-mapped file access does not go through the cache manager,
and consequently these cache hints have no effect.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10258690" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Code" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Code/" /></entry><entry><title>Why do Microsoft customer records use the abbreviation "cx" for customer?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/19/10258258.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/19/10258258.aspx</id><published>2012-01-19T15:00:00Z</published><updated>2012-01-19T15:00:00Z</updated><content type="html">&lt;P&gt;
As is common in many industries,
Microsoft customer service records employ abbreviations for
many commonly-used words.
In the travel industry, for example, &lt;I&gt;pax&lt;/I&gt; is used as
an abbreviation for &lt;I&gt;passenger&lt;/I&gt;.
The term appears to have spread to the
&lt;A HREF="http://www.proz.com/kudoz/English/tourism_travel/888545-pax.html"&gt;
hotel industry&lt;/A&gt;,
even though people who stay at a hotel aren't technically
&lt;I&gt;passengers&lt;/I&gt;.
(Well, unless you think that with the outrageous
prices charged by the hotels, the people are being
&lt;I&gt;taken for a ride&lt;/I&gt;.)
&lt;/P&gt;
&lt;P&gt;
For a time, the standard abbreviation for &lt;I&gt;customer&lt;/I&gt;
in Microsoft's customer service records was &lt;I&gt;cu&lt;/I&gt;.
This changed, however, when it was pointed out to the people
in charge of such things that &lt;I&gt;cu&lt;/I&gt; is a swear word in
Portuguese.
The standard abbreviation was therefore changed to &lt;I&gt;cx&lt;/I&gt;.
&lt;/P&gt;
&lt;P&gt;
If you're reading through old customer records and you know
Portuguese and you see the word &lt;I&gt;cu&lt;/I&gt;, please understand
that we are not calling the customer a rude name.
&lt;/P&gt;
&lt;P&gt;
The person who introduced me to this abbreviation added,
"I just spell out the word. It's not that much more work,
and it's a lot easier to read."
&lt;/P&gt;
&lt;P&gt;
Some years ago, I was asked to review a technical book,
and one of the items of feedback I returned was that
the comments in the code fragments were full of
mysterious abbreviations.
"Sgnl evt before lv cs."
I suggested that the words be spelled out or,
if you really want to use abbreviations,
at least have somewhere in the text where the abbreviations
are explained.
&lt;/P&gt;
&lt;P&gt;
If I had wanted to demonstrate the social skills of a thermonuclear
device,
my feedback might have read
"unls wrtg pzl bk, avd unxplnd n unnec abbvs."
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10258258" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Other" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Other/" /></entry><entry><title>Don't try to allocate memory until there is only x% free</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/18/10257834.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/18/10257834.aspx</id><published>2012-01-18T15:00:00Z</published><updated>2012-01-18T15:00:00Z</updated><content type="html">&lt;P&gt;
I have an ongoing conflict with my in-laws.
Their concept of the correct amount of food to have in the
refrigerator is "more than will comfortably fit."
Whenever they come to visit (which is quite often),
they make sure to bring enough food so that my refrigerator
bursts at the seams,
with vegetables and eggs and other foodstuffs crammed into every
available nook and cranny.
If I'm lucky,
the amount of food manages to get down to
"only slightly overfull" before their next visit.
And the problem isn't restricted to the refrigerator.
I once cleared out some space in the garage,
only to find that
they decided to use that space to store &lt;I&gt;more food&lt;/I&gt;.
(Who knows, maybe one day I will return from an errand to find
that my parking space has been filled with &lt;I&gt;still more food&lt;/I&gt;
while I was gone.)
&lt;/P&gt;
&lt;P&gt;
Occasionally, a customer will ask for a way to design their
program so it continues consuming RAM until there is only x% free.
The idea is that their program should use RAM aggressively,
while still leaving enough RAM available (x%) for other use.
Unless you are designing a system where you are the only program
running on the computer, this is a bad idea.
&lt;/P&gt;
&lt;P&gt;
Consider what happens if two programs try to be "good programs"
and leave x% of RAM available for other purposes.
Let's call the programs
Program&amp;nbsp;10 (which wants to keep 10% of the RAM free)
Program&amp;nbsp;20 (which wants to keep 20% of the RAM free).
For simplicity, let's suppose that they are the only two programs
on the system.
&lt;/P&gt;
&lt;P&gt;
Initially, the computer is not under memory pressure, so both programs
can allocate all the memory they want without any hassle.
But as time passes, the amount of free memory slowly decreases.
&lt;/P&gt;
&lt;TABLE BORDER=1 BORDERCOLOR=black CELLPADDING=3
       STYLE="border-collapse: collapse; width: 80%; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=20 STYLE="width: 20%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (20%)&lt;/TD&gt;
    &lt;TD COLSPAN=60 STYLE="width: 60%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (60%)&lt;/TD&gt;
    &lt;TD COLSPAN=20 STYLE="width: 20%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;20&lt;/B&gt; (20%)&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=30 STYLE="width: 30%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (30%)&lt;/TD&gt;
    &lt;TD COLSPAN=40 STYLE="width: 40%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (40%)&lt;/TD&gt;
    &lt;TD COLSPAN=30 STYLE="width: 30%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;20&lt;/B&gt; (30%)&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=40 STYLE="width: 40%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (40%)&lt;/TD&gt;
    &lt;TD COLSPAN=20 STYLE="width: 20%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (20%)&lt;/TD&gt;
    &lt;TD COLSPAN=40 STYLE="width: 40%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;20&lt;/B&gt; (40%)&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
And then we hit a critical point: The amount of free memory drops
below 20%.
&lt;/P&gt;
&lt;TABLE BORDER=1 BORDERCOLOR=black CELLPADDING=3
       STYLE="border-collapse: collapse; width: 80%; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=41 STYLE="width: 41%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (41%)&lt;/TD&gt;
    &lt;TD COLSPAN=18 STYLE="width: 18%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (18%)&lt;/TD&gt;
    &lt;TD COLSPAN=41 STYLE="width: 41%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;20&lt;/B&gt; (41%)&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
At this point, Program&amp;nbsp;20 backs off in order to restore
the amount of free memory back to 20%.
&lt;/P&gt;
&lt;TABLE BORDER=1 BORDERCOLOR=black CELLPADDING=3
       STYLE="border-collapse: collapse; width: 80%; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=41 STYLE="width: 41%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (41%)&lt;/TD&gt;
    &lt;TD COLSPAN=20 STYLE="width: 20%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (20%)&lt;/TD&gt;
    &lt;TD COLSPAN=39 STYLE="width: 39%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;20&lt;/B&gt; (39%)&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
Now, each time Program&amp;nbsp;10 and Program&amp;nbsp;20 think about
allocating more memory,
Program&amp;nbsp;20 will say "Nope, I can't do that because it would
send the amount of free memory below 20%."
On the other hand, Program&amp;nbsp;10 will happily allocate some more
memory since it sees that there's a whole 10% it can allocate
before it needs to stop.
And as soon as Program&amp;nbsp;10 allocates that memory,
Program&amp;nbsp;20 will free some memory to bring the amount of
free memory back up to 20%.
&lt;/P&gt;
&lt;TABLE BORDER=1 BORDERCOLOR=black CELLPADDING=3
       STYLE="border-collapse: collapse; width: 80%; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=42 STYLE="width: 42%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (42%)&lt;/TD&gt;
    &lt;TD COLSPAN=19 STYLE="width: 19%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (19%)&lt;/TD&gt;
    &lt;TD COLSPAN=39 STYLE="width: 39%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;20&lt;/B&gt; (39%)&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=42 STYLE="width: 42%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (42%)&lt;/TD&gt;
    &lt;TD COLSPAN=20 STYLE="width: 20%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (20%)&lt;/TD&gt;
    &lt;TD COLSPAN=38 STYLE="width: 38%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;20&lt;/B&gt; (38%)&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=43 STYLE="width: 43%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (43%)&lt;/TD&gt;
    &lt;TD COLSPAN=19 STYLE="width: 19%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (19%)&lt;/TD&gt;
    &lt;TD COLSPAN=38 STYLE="width: 38%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;20&lt;/B&gt; (38%)&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=43 STYLE="width: 43%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (43%)&lt;/TD&gt;
    &lt;TD COLSPAN=20 STYLE="width: 20%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (20%)&lt;/TD&gt;
    &lt;TD COLSPAN=37 STYLE="width: 37%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;20&lt;/B&gt; (37%)&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=44 STYLE="width: 44%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (44%)&lt;/TD&gt;
    &lt;TD COLSPAN=19 STYLE="width: 19%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (19%)&lt;/TD&gt;
    &lt;TD COLSPAN=37 STYLE="width: 37%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;20&lt;/B&gt; (37%)&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=44 STYLE="width: 44%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (44%)&lt;/TD&gt;
    &lt;TD COLSPAN=20 STYLE="width: 20%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (20%)&lt;/TD&gt;
    &lt;TD COLSPAN=36 STYLE="width: 36%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;20&lt;/B&gt; (36%)&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
I think you see where this is going.
Each time Program&amp;nbsp;10 allocates a little more memory,
Program&amp;nbsp;20 frees the same amount of memory in order to get
the total free memory back up to 20%.
Eventually, we reach a situation like this:
&lt;/P&gt;
&lt;TABLE BORDER=1 BORDERCOLOR=black CELLPADDING=3
       STYLE="border-collapse: collapse; width: 80%; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=75 STYLE="width: 75%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (75%)&lt;/TD&gt;
    &lt;TD COLSPAN=20 STYLE="width: 20%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (20%)&lt;/TD&gt;
    &lt;TD COLSPAN=5 STYLE="width: 5%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;FONT SIZE=-2&gt;&lt;B&gt;P20&lt;/B&gt; (5%)&lt;/FONT&gt;&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
Program&amp;nbsp;20 is now curled up in the corner of the computer
in a fetal position.
Program&amp;nbsp;10 meanwhile continues allocating memory,
and Program&amp;nbsp;20, having shrunk as much as it can,
is forced to just sit there and whimper.
&lt;/P&gt;
&lt;TABLE BORDER=1 BORDERCOLOR=black CELLPADDING=3
       STYLE="border-collapse: collapse; width: 80%; text-align: center"&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=76 STYLE="width: 76%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (76%)&lt;/TD&gt;
    &lt;TD COLSPAN=19 STYLE="width: 19%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (19%)&lt;/TD&gt;
    &lt;TD COLSPAN=5 STYLE="width: 5%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;FONT SIZE=-2&gt;&lt;B&gt;P20&lt;/B&gt; (5%)&lt;/FONT&gt;&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=77 STYLE="width: 77%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (77%)&lt;/TD&gt;
    &lt;TD COLSPAN=18 STYLE="width: 18%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (18%)&lt;/TD&gt;
    &lt;TD COLSPAN=5 STYLE="width: 5%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;FONT SIZE=-2&gt;&lt;B&gt;P20&lt;/B&gt; (5%)&lt;/FONT&gt;&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=78 STYLE="width: 78%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (78%)&lt;/TD&gt;
    &lt;TD COLSPAN=17 STYLE="width: 17%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (17%)&lt;/TD&gt;
    &lt;TD COLSPAN=5 STYLE="width: 5%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;FONT SIZE=-2&gt;&lt;B&gt;P20&lt;/B&gt; (5%)&lt;/FONT&gt;&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=79 STYLE="width: 79%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (79%)&lt;/TD&gt;
    &lt;TD COLSPAN=16 STYLE="width: 16%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (16%)&lt;/TD&gt;
    &lt;TD COLSPAN=5 STYLE="width: 5%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;FONT SIZE=-2&gt;&lt;B&gt;P20&lt;/B&gt; (5%)&lt;/FONT&gt;&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=80 STYLE="width: 80%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (80%)&lt;/TD&gt;
    &lt;TD COLSPAN=15 STYLE="width: 15%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (15%)&lt;/TD&gt;
    &lt;TD COLSPAN=5 STYLE="width: 5%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;FONT SIZE=-2&gt;&lt;B&gt;P20&lt;/B&gt; (5%)&lt;/FONT&gt;&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=81 STYLE="width: 81%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (81%)&lt;/TD&gt;
    &lt;TD COLSPAN=14 STYLE="width: 14%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (14%)&lt;/TD&gt;
    &lt;TD COLSPAN=5 STYLE="width: 5%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;FONT SIZE=-2&gt;&lt;B&gt;P20&lt;/B&gt; (5%)&lt;/FONT&gt;&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=82 STYLE="width: 82%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (82%)&lt;/TD&gt;
    &lt;TD COLSPAN=13 STYLE="width: 13%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (13%)&lt;/TD&gt;
    &lt;TD COLSPAN=5 STYLE="width: 5%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;FONT SIZE=-2&gt;&lt;B&gt;P20&lt;/B&gt; (5%)&lt;/FONT&gt;&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=83 STYLE="width: 83%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (83%)&lt;/TD&gt;
    &lt;TD COLSPAN=12 STYLE="width: 12%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (12%)&lt;/TD&gt;
    &lt;TD COLSPAN=5 STYLE="width: 5%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;FONT SIZE=-2&gt;&lt;B&gt;P20&lt;/B&gt; (5%)&lt;/FONT&gt;&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=84 STYLE="width: 84%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (84%)&lt;/TD&gt;
    &lt;TD COLSPAN=11 STYLE="width: 11%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (11%)&lt;/TD&gt;
    &lt;TD COLSPAN=5 STYLE="width: 5%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;FONT SIZE=-2&gt;&lt;B&gt;P20&lt;/B&gt; (5%)&lt;/FONT&gt;&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD COLSPAN=85 STYLE="width: 85%" BGCOLOR=#FFC0FF NOWRAP&gt;
    &lt;B&gt;Program&amp;nbsp;10&lt;/B&gt; (85%)&lt;/TD&gt;
    &lt;TD COLSPAN=10 STYLE="width: 10%" BGCOLOR=#C0C0C0 NOWRAP&gt;
    &lt;B&gt;Free&lt;/B&gt; (10%)&lt;/TD&gt;
    &lt;TD COLSPAN=5 STYLE="width: 5%" BGCOLOR=#C0FFFF NOWRAP&gt;
    &lt;FONT SIZE=-2&gt;&lt;B&gt;P20&lt;/B&gt; (5%)&lt;/FONT&gt;&lt;/TD&gt;
    &lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;P&gt;
Finally, Program&amp;nbsp;10 stops allocating memory since it has
reached its own personal limit of not allocating the last 10%
of the computer's RAM.
But it's too little too late.
Program&amp;nbsp;20 has already been forced into the corner,
thrashing its brains out trying to survive on only 5% of
the computer's memory.
&lt;/P&gt;
&lt;P&gt;
It's sort of like when people from two different cultures
with different concepts of
&lt;I&gt;personal space&lt;/I&gt;
have a face-to-face conversation.
The person from the not-so-close culture will try to back away
in order to preserve the necessary distance, while the person from the
closer-is-better culture will move forward in order to close the gap.
Eventually, the person from the not-so-close culture will
end up with his back against the wall anxiously looking
for an escape route.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10257834" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Code" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Code/" /></entry><entry><title>Microspeak: Walls and ladders</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/17/10257351.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/17/10257351.aspx</id><published>2012-01-17T15:00:00Z</published><updated>2012-01-17T15:00:00Z</updated><content type="html">&lt;P&gt;
Reader laonianren wanted to know more about this game
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2011/03/10/10138969.aspx#10139278"&gt;
Walls and Ladders&lt;/A&gt;.
&lt;/P&gt;
&lt;P&gt;
"Walls and Ladders" is not a game.
It's just a metaphor for a conflict in which
one side wants to perform some action and the other side
wants to prevent it.
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2009/02/26/9445006.aspx"&gt;
The defending side builds a wall, and the attacking side
builds a taller ladder&lt;/A&gt;.
In response, the defending side builds a taller wall,
and the attacking side builds an even taller ladder.
The result of this conflict is that the defending side
constructs an ever-more-elaborate wall
and the attacking side constructs
&lt;A HREF="http://boingboing.net/2009/12/23/duck-sex-competition.html"&gt;
a more-and-more complex ladder&lt;/A&gt; [link possible NSFW],
both sides expending ridiculous amounts of resources
and ultimately ending up back where they started.
&lt;/P&gt;
&lt;P&gt;
There is a closely-related metaphor known as an
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2004/02/16/73780.aspx"&gt;
arms race&lt;/A&gt;.
In an arms race,
each participant wants to be the most&amp;nbsp;&lt;I&gt;X&lt;/I&gt;,
for some property&amp;nbsp;&lt;I&gt;X&lt;/I&gt;.
An arms race tends to be all-attack,
whereas wall-and-ladders tends to have one side attacking and the other
defending.
&lt;/P&gt;
&lt;P&gt;
Since many conflicts
can be phrased either as an attack-attack scenario or an attack-defend
scenario (some defenses may include counter-attacks),
I tend to get the two confused.
Notice, for example, that my
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2004/02/16/73780.aspx"&gt;
arms race&lt;/A&gt; article contains mostly walls-and-ladders scenarios;
for example,
a case where
one side wants to terminate a process and another wants to 
prevent it from being terminated.
On the other hand, my
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2011/03/10/10138969.aspx"&gt;
wall and ladders&lt;/A&gt;
example was really more of an arms race, with both sides wanting
to take control of the screen.
&lt;/P&gt;
&lt;P&gt;
Depending on which group you work with at Microsoft,
you may find a preference for &lt;I&gt;walls and ladders&lt;/I&gt; over
&lt;I&gt;arms race&lt;/I&gt;,
probably due to the same sensitivity to military terms
that led to the
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2008/11/11/9059013.aspx"&gt;
&lt;I&gt;War Room&lt;/I&gt;
being renamed
&lt;I&gt;Ship Room&lt;/I&gt;&lt;/A&gt;.
(I seem to recall that there was a lawsuit that among other things
alleged that the fact that a Microsoft project
called its daily meeting room the &lt;I&gt;War Room&lt;/I&gt;
was proof of
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2011/05/31/10168424.aspx"&gt;
Microsoft's evil essence&lt;/A&gt;.)
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10257351" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Non-Computer" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Non_2D00_Computer/" /><category term="Microspeak" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Microspeak/" /></entry><entry><title>Cultural arbitrage: The food-related sucker bet</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/16/10256948.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/16/10256948.aspx</id><published>2012-01-16T15:00:01Z</published><updated>2012-01-16T15:00:01Z</updated><content type="html">&lt;P&gt;
While I was at a group dinner at a Chinese restaurant,
a whole fish was brought to our table.
One of the other people at the table told a story
of another time a whole fish was brought to the table.
&lt;/P&gt;
&lt;P&gt;
He attended the wedding rehearsal dinner of a family member.
The bride is Chinese, but the groom is not.
(Or maybe it was the other way around.
Doesn't matter to the story.)
The dinner was banquet-style at a Chinese restaurant,
and one of the many courses was a whole fish.
&lt;/P&gt;
&lt;P&gt;
Two of the non-Chinese attendees marveled at the presence
of an entire fish right there in front of them,
head, tail, fins, and all.
I guess they had up until then
only been served fish that had already
been filleted,
or at least had the head cut off.
One of them nudged my acquaintance and said,
"We'll give you $500 if you eat the eyeball."
&lt;/P&gt;
&lt;P&gt;
These guys inadvertently created their own sucker bet.
&lt;/P&gt;
&lt;P&gt;
For you see,
eating the eyeball is common in many parts of Asia.
In fact,
whenever their family has fish,
my nieces fight over who gets the honor of
eating the eyeballs!
&lt;/P&gt;
&lt;P&gt;
I don't know whether my acquaintance cheerfully accepted the bet
or whether he explained that their bet was a poor choice to
offer a Chinese person.
&lt;/P&gt;
&lt;P&gt;
What food-related sucker bets exist in your culture?
(I'm not talking about foods like chicken feet or tongue,
which are clearly prepared and served to be eaten.
I'm talking about things that an uninitiated person might
consider to be a garnish or an inedible by-product,
like shrimp heads.)
&lt;/P&gt;
&lt;P&gt;
&lt;B&gt;Update&lt;/B&gt;:
I remind you that the question is not asking for foods
which are served as dishes on their own.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10256948" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Non-Computer" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Non_2D00_Computer/" /></entry><entry><title>Why was there a font just for drawing symbols on buttons?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/16/10256947.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/16/10256947.aspx</id><published>2012-01-16T15:00:00Z</published><updated>2012-01-16T15:00:00Z</updated><content type="html">&lt;P&gt;
&lt;A HREF="http://www.henke37.cjb.net/"&gt;
Henke37&lt;/A&gt;
wonders
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2010/07/20/10040074.aspx#10040363"&gt;
why the Marlett font was introduced.
Why use a font for drawing symbols on window buttons&lt;/A&gt;?
&lt;/P&gt;
&lt;P&gt;
Using a font was a convenient way to have scalable graphics.
&lt;/P&gt;
&lt;P&gt;
It's not like Windows could've used VML or SVG since they hadn't
been invented yet.
EMFs would have been overkill as well.
Fonts were very convenient because the technology to render
scalable fonts already existed and was well-established.
It's always good to build on something that has been proven,
and TrueType scalable font technology proved itself very
nicely in Windows&amp;nbsp;3.1.
TrueType has the added benefit of supporting &lt;I&gt;hinting&lt;/I&gt;,
allowing tweaks to the glyph outlines to be made for particular
pixel sizes.
(A feature not available in most vector drawing languages,
but also a feature very important when rendering at small
font sizes.)
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10256947" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Tips/Support" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Tips_2F00_Support/" /></entry><entry><title>Keys duplicated from photo: Delayed reaction</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/13/10256147.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/13/10256147.aspx</id><published>2012-01-13T15:00:01Z</published><updated>2012-01-13T15:00:01Z</updated><content type="html">&lt;P&gt;
There was a report some time ago that
&lt;A HREF="http://www.jacobsschool.ucsd.edu/news/news_releases/release.sfe?id=791"&gt;
researchers have developed a way to duplicate keys given only a photograph&lt;/A&gt;.
When I read this story,
I was reminded of an incident that occurred to a colleague of mine.
&lt;/P&gt;
&lt;P&gt;
He accidentally locked his keys in his car and called a locksmith.
Frustratingly, the keys were sitting right there on the driver's seat.
The locksmith arrived and assessed the situation.
"Well, since you already paid for me to come all the way out here,
how would you like a spare key?"
&lt;/P&gt;
&lt;P&gt;
"Huh? What do you mean?"
&lt;/P&gt;
&lt;P&gt;
The locksmith looked at the key on the driver's seat,
studied it intently for a few seconds,
then returned to his truck.
A short while later, he returned with a freshly-cut key,
which he inserted into the door lock.
&lt;/P&gt;
&lt;P&gt;
The key worked.
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10256147" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Non-Computer" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Non_2D00_Computer/" /></entry><entry><title>How do I print non-error messages during compilation?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/13/10256146.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/13/10256146.aspx</id><published>2012-01-13T15:00:00Z</published><updated>2012-01-13T15:00:00Z</updated><content type="html">&lt;P&gt;
Commenter Worf remarked,
"&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2008/04/09/8370479.aspx#8374137"
&gt;My one wish is that &lt;CODE&gt;#warning&lt;/CODE&gt; would be supported&lt;/A&gt;."
&lt;/P&gt;
&lt;P&gt;
I always find it interesting when people say
"I wish that Microsoft
would stop following standards,"
since the &lt;CODE&gt;#warning&lt;/CODE&gt; directive is nonstandard.
&lt;/P&gt;
&lt;P&gt;
The Microsoft C/C++ compiler implements the feature in
a method compatible with the standard,
namely via a &lt;CODE&gt;#pragma&lt;/CODE&gt; directive.
&lt;/P&gt;
&lt;CODE&gt;
#pragma message("You really shouldn't be doing that.")
&lt;/CODE&gt;
&lt;P&gt;
If you want to warn people away from deprecated functionality,
you can use
&lt;A HREF="http://msdn.microsoft.com/library/c8xdzzhh.aspx"&gt;
the &lt;CODE&gt;#pragma deprecated()&lt;/CODE&gt; directive&lt;/A&gt;
or the even more convenient (but more standards-troublesome)
&lt;A HREF="http://msdn.microsoft.com/library/044swk7y.aspx"&gt;
&lt;CODE&gt;__declspec&lt;WBR&gt;(deprecated)&lt;/CODE&gt; declaration specifier&lt;/A&gt;.
The declaration specifier is much more convenient than the preprocessor
directive because you can use it in a macro,
and you can attach it to specific overloads of a function.
(It's also more standards-troublesome because, while it is still
permitted by the standard because it begins with a double-underscore,
it is also not required to be ignored by compilers which do not
understand it.)
&lt;/P&gt;
&lt;P&gt;
In my experience, however, printing messages during compilation is
of little consequence.
Print all the messages during compilation as you want;
&lt;A HREF="http://blogs.msdn.com/b/larryosterman/archive/2011/05/03/nobody-ever-reads-the-event-logs.aspx"&gt;
nobody will read them&lt;/A&gt;.
The only thing that gets attention is an actual warning or error.
(And in many cases, only the error will get any attention at all.)
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10256146" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Code" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Code/" /></entry><entry><title>Puzzling out the upsell-o-meter</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/oldnewthing/archive/2012/01/12/10255745.aspx" /><id>http://blogs.msdn.com/b/oldnewthing/archive/2012/01/12/10255745.aspx</id><published>2012-01-12T15:00:01Z</published><updated>2012-01-12T15:00:01Z</updated><content type="html">&lt;P&gt;
As I noted before,
&lt;A HREF="http://blogs.msdn.com/b/oldnewthing/archive/2010/05/14/10009455.aspx"&gt;
many grocery stores in the United States have a printer
next to the cash register which prints out coupons
customized to your purchases&lt;/A&gt;.
Here's a purchase and the accompanying coupon.
What is the story behind this pairing?
&lt;/P&gt;
&lt;P&gt;
Purchased: Diapers for newborn baby.&lt;BR&gt;
Coupon: Save 75 cents on ice cream.
&lt;/P&gt;
&lt;P&gt;
&lt;B&gt;Bonus chatter&lt;/B&gt;:
While waiting in line, I read the warning label on the diapers.
It went on for quite a bit, but one part triggered my
"I wonder what lawsuit led to this warning" sensor:
"Like most articles of clothing,
XYZ brand diapers will burn if exposed to flame."
Did somebody say,
"Oh no, there's a fire, what will I do?
I know, I'll smother the fire with my baby's diapered bottom!"
&lt;/P&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10255745" width="1" height="1"&gt;</content><author><name>Raymond Chen - MSFT</name><uri>http://blogs.msdn.com/oldnewthing/ProfileUrlRedirect.ashx</uri></author><category term="Non-Computer" scheme="http://blogs.msdn.com/b/oldnewthing/archive/tags/Non_2D00_Computer/" /></entry></feed>
